From 553906b046bb0fbaceb444a622c47712a3348aa1 Mon Sep 17 00:00:00 2001 From: Simon Gerber Date: Tue, 13 Dec 2022 17:28:20 +0100 Subject: [PATCH] Add separate steps in GitHub action for snapshots and release builds The goreleaser v4 GitHub action has completely removed support for automatically doing snapshot builds for commits which aren't associated with a tag. Since goreleaser's `--snapshot` doesn't have any smarts to do a non-snapshot build for commits which are tagged, we split the goreleaser step into separate steps for actions running against a tag and actions running against master. --- .github/workflows/release.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c8e14c5..1897f39 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -47,7 +47,13 @@ jobs: outputFile: .github/release-notes.md env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Publish releases + - name: Build snapshot for master + if: "!startsWith(github.ref, 'refs/tags/v')" + uses: goreleaser/goreleaser-action@v4 + with: + args: build --snapshot + - name: Build and publish release for tag + if: startsWith(github.ref, 'refs/tags/v') uses: goreleaser/goreleaser-action@v4 with: args: release --release-notes .github/release-notes.md