Skip to content

Commit

Permalink
Update goreleaser to latest
Browse files Browse the repository at this point in the history
  • Loading branch information
vcheung-stripe committed Jan 22, 2025
1 parent 7d7f58a commit 1c62d05
Show file tree
Hide file tree
Showing 5 changed files with 51 additions and 39 deletions.
21 changes: 12 additions & 9 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,11 @@ jobs:
with:
go-version: 1.22.0
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v5
uses: goreleaser/goreleaser-action@v6
with:
version: v0.184.0
args: release -f .goreleaser/mac.yml --rm-dist
distribution: goreleaser
version: "~> v2"
args: release -f .goreleaser/mac.yml --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GORELEASER_GITHUB_TOKEN: ${{ secrets.GORELEASER_GITHUB_TOKEN }}
Expand Down Expand Up @@ -54,10 +55,11 @@ jobs:
with:
go-version: 1.22.0
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v5
uses: goreleaser/goreleaser-action@v6
with:
version: v0.184.0
args: release -f .goreleaser/linux.yml --rm-dist
distribution: goreleaser
version: "~> v2"
args: release -f .goreleaser/linux.yml --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ARTIFACTORY_SECRET: ${{ secrets.ARTIFACTORY_SECRET }}
Expand All @@ -74,10 +76,11 @@ jobs:
with:
go-version: 1.22.0
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v5
uses: goreleaser/goreleaser-action@v6
with:
version: v0.184.0
args: release -f .goreleaser/windows.yml --rm-dist
distribution: goreleaser
version: "~> v2"
args: release -f .goreleaser/windows.yml --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GORELEASER_GITHUB_TOKEN: ${{ secrets.GORELEASER_GITHUB_TOKEN }}
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/test-snapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,11 @@ jobs:
with:
go-version: 1.22.0
- name: Run GoReleaser Snapshot
uses: goreleaser/goreleaser-action@v5
uses: goreleaser/goreleaser-action@v6
with:
version: v0.184.0
args: release -f .goreleaser/linux.yml --rm-dist --snapshot
distribution: goreleaser
version: "~> v2"
args: release -f .goreleaser/linux.yml --clean --snapshot
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ARTIFACTORY_SECRET: ${{ secrets.ARTIFACTORY_SECRET }}
12 changes: 7 additions & 5 deletions .goreleaser/linux.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
version: 2
env:
- GO111MODULE=on
before:
Expand Down Expand Up @@ -29,10 +30,11 @@ builds:
goarch:
- arm64
archives:
- replacements:
linux: linux
386: i386
amd64: x86_64
- name_template: >-
{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_
{{- if eq .Arch "386" }}i386
{{- else if eq .Arch "amd64" }}x86_64
{{- else }}{{ .Arch }}{{ end }}
files:
- none*
changelog:
Expand All @@ -44,7 +46,7 @@ changelog:
checksum:
name_template: "{{ .ProjectName }}-linux-checksums.txt"
snapshot:
name_template: "{{ .Tag }}-next"
version_template: "{{ .Version }}-next"
nfpms:
- id: deb
package_name: stripe
Expand Down
14 changes: 9 additions & 5 deletions .goreleaser/mac.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
version: 2
env:
- GO111MODULE=on
before:
Expand Down Expand Up @@ -29,9 +30,12 @@ builds:
goarch:
- arm64
archives:
- replacements:
darwin: mac-os
amd64: x86_64
- name_template: >-
{{ .ProjectName }}_{{ .Version }}_
{{- if eq .Os "darwin"}}mac-os
{{- else }}{{ .Os }}{{end}}_
{{- if eq .Arch "amd64" }}x86_64
{{- else }}{{ .Arch }}{{ end }}
files:
- none*
changelog:
Expand All @@ -43,9 +47,9 @@ changelog:
checksum:
name_template: "{{ .ProjectName }}-mac-checksums.txt"
snapshot:
name_template: "{{ .Tag }}-next"
version_template: "{{ .Version }}-next"
brews:
- tap:
- repository:
owner: stripe
name: homebrew-stripe-cli
token: "{{ .Env.GORELEASER_GITHUB_TOKEN }}" # This token can access the repo, but GITHUB_TOKEN cannot
Expand Down
36 changes: 19 additions & 17 deletions .goreleaser/windows.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
version: 2
env:
- GO111MODULE=on
before:
Expand All @@ -21,13 +22,14 @@ builds:
- amd64
- 386
archives:
- replacements:
windows: windows
386: i386
amd64: x86_64
- name_template: >-
{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_
{{- if eq .Arch "386" }}i386
{{- else if eq .Arch "amd64" }}x86_64
{{- else }}{{ .Arch }}{{ end }}
format_overrides:
- goos: windows
format: zip
formats: zip
files:
- none*
changelog:
Expand All @@ -39,15 +41,15 @@ changelog:
checksum:
name_template: "{{ .ProjectName }}-windows-checksums.txt"
snapshot:
name_template: "{{ .Tag }}-next"
scoop:
bucket:
owner: stripe
name: scoop-stripe-cli
token: "{{ .Env.GORELEASER_GITHUB_TOKEN }}" # This token can access the repo, but GITHUB_TOKEN cannot
commit_author:
name: stripe-ci
email: [email protected]
homepage: https://stripe.com
description: Stripe CLI utility
license: Apache 2.0
version_template: "{{ .Version }}-next"
scoops:
- repository:
owner: stripe
name: scoop-stripe-cli
token: "{{ .Env.GORELEASER_GITHUB_TOKEN }}" # This token can access the repo, but GITHUB_TOKEN cannot
commit_author:
name: stripe-ci
email: [email protected]
homepage: https://stripe.com
description: Stripe CLI utility
license: Apache 2.0

0 comments on commit 1c62d05

Please sign in to comment.