Skip to content

Commit d680f64

Browse files
add back goreleaser
1 parent 7bf34aa commit d680f64

File tree

4 files changed

+1161
-21
lines changed

4 files changed

+1161
-21
lines changed

.github/workflows/pr.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,3 +156,19 @@ jobs:
156156
});
157157
158158
return result;
159+
validate-goreleaser:
160+
runs-on: ubuntu-latest
161+
steps:
162+
- name: Checkout code
163+
uses: actions/checkout@v4
164+
- name: Install Go
165+
uses: actions/setup-go@v5
166+
with:
167+
go-version: 1.24.x
168+
- name: Run GoReleaser
169+
uses: goreleaser/goreleaser-action@v5
170+
with:
171+
version: v2.6.1
172+
install-only: true
173+
- name: Validate Goreleaser
174+
run: make goreleaser GORELEASER_ARGS="--skip=validate --clean --snapshot" # snapshot is needed as local git has no tags

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ fmt:
7070
golangci-lint fmt
7171

7272
goreleaser-bin:
73-
$(GO_BIN) install github.com/goreleaser/goreleaser/v2@latest
73+
$(GO_BIN) get -modfile=tools.mod -tool github.com/goreleaser/goreleaser/v2@latest
7474

7575
# You can pass flags to goreleaser via GORELEASER_ARGS
7676
# --skip=validate will skip the checks
@@ -79,7 +79,7 @@ goreleaser-bin:
7979
# e.g.
8080
# make goreleaser GORELEASER_ARGS="--skip=validate --clean"
8181
goreleaser: goreleaser-bin
82-
@GOHOSTOS="${GOHOSTOS}" GOHOSTARCH="${GOHOSTARCH}" tool -modfile=tools.mod goreleaser build ${GORELEASER_ARGS}
82+
@GOHOSTOS="${GOHOSTOS}" GOHOSTARCH="${GOHOSTARCH}" $(GO_BIN) tool -modfile=tools.mod goreleaser build ${GORELEASER_ARGS}
8383

8484
test-compile:
8585
@if [ "$(TEST)" = "./..." ]; then \

0 commit comments

Comments
 (0)