From da9f4f453fe5b564cb2b7f681b2fc0e12fd2d3c7 Mon Sep 17 00:00:00 2001 From: Harry Marr Date: Wed, 26 Jun 2024 12:56:18 -0400 Subject: [PATCH] add manual release action --- .github/workflows/manual-release.yml | 39 ++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .github/workflows/manual-release.yml diff --git a/.github/workflows/manual-release.yml b/.github/workflows/manual-release.yml new file mode 100644 index 0000000..c68058f --- /dev/null +++ b/.github/workflows/manual-release.yml @@ -0,0 +1,39 @@ +name: release + +on: + push: + tags: + - "v*" + workflow_dispatch: + inputs: + release_ref: + description: "Tag" + required: true + default: "refs/tags/v0.0.0" + +jobs: + release: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + ref: ${{ inputs.release_ref }} + fetch-depth: 0 + + - name: Set up Go + uses: actions/setup-go@v5 + with: + go-version: 1.18 + + - name: Test + run: go test ./... -v + + - name: Run GoReleaser + uses: goreleaser/goreleaser-action@v6 + with: + version: latest + args: release --clean + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + HOMEBREW_TAP_RELEASE_TOKEN: ${{ secrets.HOMEBREW_TAP_RELEASE_TOKEN }}