Skip to content

Commit

Permalink
chore: Update GoReleaser config for release
Browse files Browse the repository at this point in the history
  • Loading branch information
samcm committed Aug 24, 2023
1 parent a7adc35 commit 5dd0bf4
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions .github/workflows/goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}

0 comments on commit 5dd0bf4

Please sign in to comment.