Skip to content

Commit 940218f

Browse files
committed
ci: pin GoReleaser to v2.9.0 and update configs to version 2
goreleaser-action v7 resolves `version: latest` to GoReleaser v2, where v5 resolved it to v1. `goreleaser check` on v2.19.0 exits 2 because the config uses deprecated properties. - Add `version: 2` and rename `archives.format` to `formats`. - In .goreleaser-patch.yml, rename `brews.tap` to `repository` and `brews.folder` to `directory`; GoReleaser v2 removed the old names. - Pin GoReleaser to v2.9.0, the last release before `brews` was deprecated in favor of `homebrew_casks`. Moving to casks changes how the Homebrew tap is published, so it is left for a separate change.
1 parent f707247 commit 940218f

4 files changed

Lines changed: 13 additions & 8 deletions

File tree

‎.github/workflows/goreleaser-check.yml‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,7 @@ jobs:
1515
- name: Check GoReleaser config
1616
uses: goreleaser/goreleaser-action@v7
1717
with:
18-
version: latest
18+
# Pinned: GoReleaser v2.10+ deprecates `brews`, which fails
19+
# `goreleaser check`. Unpin after moving to `homebrew_casks`.
20+
version: v2.9.0
1921
args: check

‎.github/workflows/goreleaser.yml‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,8 @@ jobs:
190190
- name: Run GoReleaser
191191
uses: goreleaser/goreleaser-action@v7
192192
with:
193-
version: latest
193+
# Keep in sync with the version in goreleaser-check.yml.
194+
version: v2.9.0
194195
# We use a different goreleaser config for releasing a new latest version vs.
195196
# releasing a patch on an older version. For releasing the new latest version,
196197
# we want to update the main (unversioned) Homebrew formula. For releasing a

‎.goreleaser-patch.yml‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
# the Homebrew tap and does not publish a "latest" image to Docker Hub. It should match
44
# .goreleaser.yml in every way except for the brews.name template and the
55
# dockers.image_templates list.
6+
version: 2
67
dist: release
78
env:
89
- GO111MODULE=on
@@ -27,22 +28,22 @@ builds:
2728
- arm64
2829
archives:
2930
- id: tarball
30-
format: tar.gz
31+
formats: tar.gz
3132
- id: bin
32-
format: binary
33+
formats: binary
3334
wrap_in_directory: false
3435
name_template: "src_{{ .Os }}_{{ .Arch }}"
3536
brews:
3637
-
3738
name: src-cli@{{ .Major }}.{{ .Minor }}.{{ .Patch }}
3839
homepage: "https://sourcegraph.com/"
3940
description: "Sourcegraph CLI"
40-
tap:
41+
repository:
4142
owner: sourcegraph
4243
name: homebrew-src-cli
4344
# Folder inside the repository to put the formula.
4445
# Default is the root folder.
45-
folder: Formula
46+
directory: Formula
4647
# We need to set this so that goreleaser doesn't think the binary is called
4748
# `src-cli`
4849
install: |

‎.goreleaser.yml‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
# release. It updates the main formula in the Homebrew tap. It should match
33
# .goreleaser-patch.yml in every way except for the brews.name template and the
44
# dockers.image_templates list.
5+
version: 2
56
dist: release
67
env:
78
- GO111MODULE=on
@@ -26,9 +27,9 @@ builds:
2627
- arm64
2728
archives:
2829
- id: tarball
29-
format: tar.gz
30+
formats: tar.gz
3031
- id: bin
31-
format: binary
32+
formats: binary
3233
wrap_in_directory: false
3334
name_template: "src_{{ .Os }}_{{ .Arch }}"
3435
brews:

0 commit comments

Comments
 (0)