From b521947551cdacf06962c1555b681b7412a2c1aa Mon Sep 17 00:00:00 2001 From: "JM (Jason Meridth)" Date: Wed, 8 Jan 2025 22:49:27 -0600 Subject: [PATCH] fix: move goreleaser action workflow job to release workflow (#64) Due to security limitations when a workflow is run with GITHUB_TOKEN (our release job) another workflow that also uses GITHUB_TOKEN will not fire-off when in another workflow. I've moved goreleaser to the release workflow. Signed-off-by: jmeridth --- .github/workflows/goreleaser.yml | 28 ---------------------------- .github/workflows/release.yml | 22 ++++++++++++++++++++++ 2 files changed, 22 insertions(+), 28 deletions(-) delete mode 100644 .github/workflows/goreleaser.yml diff --git a/.github/workflows/goreleaser.yml b/.github/workflows/goreleaser.yml deleted file mode 100644 index 4d112a9..0000000 --- a/.github/workflows/goreleaser.yml +++ /dev/null @@ -1,28 +0,0 @@ ---- -name: "Goreleaser" -on: - workflow_dispatch: - release: - types: [published] -jobs: - goreleaser: - runs-on: ubuntu-latest - permissions: - contents: write - steps: - - name: Checkout - uses: actions/checkout@v4.2.2 - with: - fetch-depth: 0 - - name: Set up Go - uses: actions/setup-go@v5 - with: - go-version: 1.23.4 - - name: Run GoReleaser - uses: goreleaser/goreleaser-action@9ed2f89a662bf1735a48bc8557fd212fa902bebf - with: - distribution: goreleaser - version: "~> v2" - args: release --clean - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6ef4838..b8cf113 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -16,3 +16,25 @@ jobs: release-config-name: release-drafter.yml secrets: github-token: ${{ secrets.GITHUB_TOKEN }} + goreleaser: + needs: release + runs-on: ubuntu-latest + permissions: + contents: write + steps: + - name: Checkout + uses: actions/checkout@v4.2.2 + with: + fetch-depth: 0 + - name: Set up Go + uses: actions/setup-go@v5 + with: + go-version: 1.23.4 + - name: Run GoReleaser + uses: goreleaser/goreleaser-action@9ed2f89a662bf1735a48bc8557fd212fa902bebf + with: + distribution: goreleaser + version: "~> v2" + args: release --clean + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}