on main help sign in
ci: goreleaser build --snapshot on every commit to main (#1910)

* ci: goreleaser build --snapshot on every commit to main Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com> * chore: add preconditions Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com> * fix: faster runners Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com> --------- Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>

commitc682e1c1007b9983f6190edcc900134a93d969fe authorCarlos Alexandro Becker <caarlos0@users.noreply.github.com> dateFri 23 Jan 2026, 12:08 (9 months ago) parent49a41de
2 files changed+37
.github/workflows/snapshot.yml+33 Taskfile.yaml+4
.github/workflows/snapshot.ymlnew file+33
@@ -0,0 +1,33 @@
1+name: snapshot
2+
3+on:
4+ push:
5+ branches:
6+ - main
7+
8+permissions:
9+ contents: read
10+
11+concurrency:
12+ group: snapshot-${{ github.ref }}
13+ cancel-in-progress: true
14+
15+jobs:
16+ snapshot:
17+ runs-on:
18+ # Use our own large runners with more CPU and RAM for faster builds
19+ group: releasers
20+ steps:
21+ - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
22+ with:
23+ fetch-depth: 0
24+ persist-credentials: false
25+ - uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # v6.1.0
26+ with:
27+ go-version-file: go.mod
28+ - uses: goreleaser/goreleaser-action@9c156ee8a17a598857849441385a2041ef570552 # v6.3.0
29+ with:
30+ version: "~> v2"
31+ args: build --snapshot --clean
32+ env:
33+ GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}
Taskfile.yaml+4
@@ -122,6 +122,10 @@ tasks:
122122 msg: Not on main branch
123123 - sh: "[ $(git status --porcelain=2 | wc -l) = 0 ]"
124124 msg: "Git is dirty"
125+ - sh: 'gh run list --workflow build.yml --commit $(git rev-parse HEAD) --status success --json conclusion -q ".[0].conclusion" | grep -q success'
126+ msg: "Test build for this commit failed or not present"
127+ - sh: 'gh run list --workflow snapshot.yml --commit $(git rev-parse HEAD) --status success --json conclusion -q ".[0].conclusion" | grep -q success'
128+ msg: "Snapshot build for this commit failed or not present"
125129 cmds:
126130 - task: fetch-tags
127131 - git commit --allow-empty -m "{{.NEXT}}"