Skip to content

Commit

Permalink
Fixes for Gorelease 2.2 (#62)
Browse files Browse the repository at this point in the history
And support for manually testing CI process
  • Loading branch information
Aptimex authored Sep 6, 2024
1 parent 342aa4e commit 3fe2928
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
11 changes: 8 additions & 3 deletions .github/workflows/goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,12 @@ on:
jobs:
goreleaser:
runs-on: ubuntu-latest
env:
flags: ""
steps:
- if: ${{ !startsWith(github.ref, 'refs/tags/v') }}
# Allows manually running this on an untagged commit without actually generating a release
run: echo "flags=--snapshot" >> $GITHUB_ENV
- name: Checkout
uses: actions/checkout@v4
with:
Expand All @@ -23,7 +28,7 @@ jobs:
uses: goreleaser/goreleaser-action@v6
with:
distribution: goreleaser
version: latest
version: '~> v2'
args: check
workdir: ./src
env:
Expand All @@ -33,8 +38,8 @@ jobs:
with:
# either 'goreleaser' (default) or 'goreleaser-pro'
distribution: goreleaser
version: latest
args: release --clean
version: '~> v2'
args: release --clean ${{ env.flags }}
workdir: ./src
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
3 changes: 2 additions & 1 deletion src/.goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
version: 2
before:
hooks:
- go mod tidy
Expand Down Expand Up @@ -25,7 +26,7 @@ archives:
checksum:
name_template: "checksums.txt"
snapshot:
name_template: "{{ incpatch .Version }}-next"
version_template: "{{ incpatch .Version }}-next"
changelog:
use: github-native
# sort: asc
Expand Down

0 comments on commit 3fe2928

Please sign in to comment.