Skip to content

Commit a4efd35

Browse files
committed
fix: update CI workflow to only run releases on tags
1 parent 3278ac8 commit a4efd35

File tree

1 file changed

+28
-1
lines changed

1 file changed

+28
-1
lines changed

.github/workflows/ci.yml

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,37 @@ jobs:
4343
name: pdf-joiner
4444
path: pdf-joiner
4545

46+
snapshot:
47+
name: Snapshot Build
48+
needs: [test, build]
49+
if: github.ref == 'refs/heads/main'
50+
runs-on: macos-latest
51+
permissions:
52+
contents: write
53+
packages: write
54+
steps:
55+
- uses: actions/checkout@v4
56+
with:
57+
fetch-depth: 0
58+
59+
- name: Set up Go
60+
uses: actions/setup-go@v5
61+
with:
62+
go-version: '1.24.3'
63+
64+
- name: Run GoReleaser Snapshot
65+
uses: goreleaser/goreleaser-action@v5
66+
with:
67+
distribution: goreleaser
68+
version: latest
69+
args: release --snapshot --clean --skip-validate
70+
env:
71+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
72+
4673
release:
4774
name: Release
4875
needs: [test, build]
49-
if: startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main'
76+
if: startsWith(github.ref, 'refs/tags/v')
5077
runs-on: macos-latest
5178
permissions:
5279
contents: write

0 commit comments

Comments
 (0)