From 5dd0bf4f21999ba815590b8ca9996fbc0b658050 Mon Sep 17 00:00:00 2001 From: Sam Calder-Mason Date: Thu, 24 Aug 2023 12:54:31 +1000 Subject: [PATCH] chore: Update GoReleaser config for release --- .github/workflows/goreleaser.yaml | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/.github/workflows/goreleaser.yaml b/.github/workflows/goreleaser.yaml index 68d5457..5c9a790 100644 --- a/.github/workflows/goreleaser.yaml +++ b/.github/workflows/goreleaser.yaml @@ -51,22 +51,21 @@ jobs: password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Update GoReleaser config run: | + cp .goreleaser.yaml ../.goreleaser.yaml.new + # If we have a valid RELEASE_SUFFIX, update the goreleaser config to not set # the release as the latest if [[ -n "$RELEASE_SUFFIX" ]]; then - echo "release:" >> .goreleaser.yaml - echo " prerelease: true" >> .goreleaser.yaml - echo " make_latest: false" >> .goreleaser.yaml + echo "release:" >> ../.goreleaser.yaml.new + echo " prerelease: true" >> ../.goreleaser.yaml.new + echo " make_latest: false" >> ../.goreleaser.yaml.new fi - - # Add goreleaser config to gitignore so it doesnt complain about a dirty git state - echo ".goreleaser.yaml" >> .gitignore - name: Run GoReleaser uses: goreleaser/goreleaser-action@v4 with: distribution: goreleaser version: latest - args: release --clean + args: release --clean --config ../.goreleaser.yaml.new env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} RELEASE_SUFFIX: ${{ env.RELEASE_SUFFIX }}