Skip to content

Commit 392489b

Browse files
authored
Merge pull request #133 from hookdeck/chore/release-updates
chore: update release workflows
2 parents a554b09 + 94a371b commit 392489b

File tree

6 files changed

+40
-117
lines changed

6 files changed

+40
-117
lines changed

.github/workflows/release.yml

Lines changed: 6 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ jobs:
1818
with:
1919
go-version: 1.18.1
2020
- name: Run GoReleaser
21-
uses: goreleaser/goreleaser-action@v4
21+
uses: goreleaser/goreleaser-action@v5
2222
with:
23-
version: latest
23+
version: v2.10.2
2424
args: release -f .goreleaser/mac.yml --clean
2525
env:
2626
GITHUB_TOKEN: ${{ secrets.GORELEASER_GITHUB_TOKEN }}
@@ -49,9 +49,9 @@ jobs:
4949
with:
5050
go-version: 1.18.1
5151
- name: Run GoReleaser
52-
uses: goreleaser/goreleaser-action@v4
52+
uses: goreleaser/goreleaser-action@v5
5353
with:
54-
version: latest
54+
version: v2.10.2
5555
args: release -f .goreleaser/linux.yml --clean
5656
env:
5757
GITHUB_TOKEN: ${{ secrets.GORELEASER_GITHUB_TOKEN }}
@@ -70,33 +70,14 @@ jobs:
7070
- name: Run GoReleaser
7171
uses: goreleaser/goreleaser-action@v5
7272
with:
73-
version: latest
73+
version: v2.10.2
7474
args: release -f .goreleaser/windows.yml --clean
7575
env:
7676
GITHUB_TOKEN: ${{ secrets.GORELEASER_GITHUB_TOKEN }}
7777

78-
build-windows-npm:
79-
runs-on: windows-latest
80-
steps:
81-
- name: Code checkout
82-
uses: actions/checkout@v4
83-
with:
84-
fetch-depth: 0
85-
- name: Set up Go
86-
uses: actions/setup-go@v5
87-
with:
88-
go-version: 1.18.1
89-
- name: Run GoReleaser
90-
uses: goreleaser/goreleaser-action@v5
91-
with:
92-
version: latest
93-
args: release -f .goreleaser/windows-npm.yml --clean
94-
env:
95-
GITHUB_TOKEN: ${{ secrets.GORELEASER_GITHUB_TOKEN }}
96-
9778
publish-npm:
9879
runs-on: ubuntu-latest
99-
needs: [build-windows-npm, build-linux, build-mac]
80+
needs: [build-windows, build-linux, build-mac]
10081
steps:
10182
- uses: actions/checkout@v4
10283
with:

.github/workflows/test.yml

Lines changed: 5 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ jobs:
2323
with:
2424
go-version: 1.18.1
2525
- name: Run GoReleaser
26-
uses: goreleaser/goreleaser-action@v4
26+
uses: goreleaser/goreleaser-action@v5
2727
with:
28-
version: latest
28+
version: v2.10.2
2929
args: release --skip=publish --snapshot -f .goreleaser/mac.yml --clean
3030
env:
3131
GITHUB_TOKEN: ${{ secrets.GORELEASER_GITHUB_TOKEN }}
@@ -55,9 +55,9 @@ jobs:
5555
with:
5656
go-version: 1.18.1
5757
- name: Run GoReleaser
58-
uses: goreleaser/goreleaser-action@v4
58+
uses: goreleaser/goreleaser-action@v5
5959
with:
60-
version: latest
60+
version: v2.10.2
6161
args: release --skip=publish --snapshot -f .goreleaser/linux.yml --clean
6262
env:
6363
GITHUB_TOKEN: ${{ secrets.GORELEASER_GITHUB_TOKEN }}
@@ -76,26 +76,7 @@ jobs:
7676
- name: Run GoReleaser
7777
uses: goreleaser/goreleaser-action@v5
7878
with:
79-
version: latest
79+
version: v2.10.2
8080
args: release --skip=publish --snapshot -f .goreleaser/windows.yml --clean
8181
env:
8282
GITHUB_TOKEN: ${{ secrets.GORELEASER_GITHUB_TOKEN }}
83-
84-
build-windows-npm:
85-
runs-on: windows-latest
86-
steps:
87-
- name: Code checkout
88-
uses: actions/checkout@v4
89-
with:
90-
fetch-depth: 0
91-
- name: Set up Go
92-
uses: actions/setup-go@v5
93-
with:
94-
go-version: 1.18.1
95-
- name: Run GoReleaser
96-
uses: goreleaser/goreleaser-action@v5
97-
with:
98-
version: latest
99-
args: release --skip=publish --snapshot -f .goreleaser/windows-npm.yml --clean
100-
env:
101-
GITHUB_TOKEN: ${{ secrets.GORELEASER_GITHUB_TOKEN }}

.goreleaser/linux.yml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
version: 2
12
env:
23
- GO111MODULE=on
34
before:
@@ -55,8 +56,8 @@ dockers:
5556
ids:
5657
- hookdeck-linux
5758
image_templates:
58-
- "hookdeck/hookdeck-cli:latest-amd64"
5959
- "hookdeck/hookdeck-cli:{{ .Tag }}-amd64"
60+
- "{{ if not .Prerelease }}hookdeck/hookdeck-cli:latest-amd64{{ end }}"
6061
build_flag_templates:
6162
- "--pull"
6263
- "--label=org.opencontainers.image.created={{.Date}}"
@@ -71,8 +72,8 @@ dockers:
7172
ids:
7273
- hookdeck-linux-arm64
7374
image_templates:
74-
- "hookdeck/hookdeck-cli:latest-arm64"
7575
- "hookdeck/hookdeck-cli:{{ .Tag }}-arm64"
76+
- "{{ if not .Prerelease }}hookdeck/hookdeck-cli:latest-arm64{{ end }}"
7677
build_flag_templates:
7778
- "--pull"
7879
- "--label=org.opencontainers.image.created={{.Date}}"
@@ -83,11 +84,12 @@ dockers:
8384
- "--label=homepage=https://hookdeck.com"
8485
- "--platform=linux/arm64/v8"
8586
docker_manifests:
86-
- name_template: "hookdeck/hookdeck-cli:latest"
87-
image_templates:
88-
- "hookdeck/hookdeck-cli:latest-amd64"
89-
- "hookdeck/hookdeck-cli:latest-arm64"
9087
- name_template: "hookdeck/hookdeck-cli:{{ .Tag }}"
9188
image_templates:
9289
- "hookdeck/hookdeck-cli:{{ .Tag }}-amd64"
9390
- "hookdeck/hookdeck-cli:{{ .Tag }}-arm64"
91+
- name_template: "hookdeck/hookdeck-cli:latest"
92+
image_templates:
93+
- "hookdeck/hookdeck-cli:latest-amd64"
94+
- "hookdeck/hookdeck-cli:latest-arm64"
95+
skip_push: auto

.goreleaser/mac.yml

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
version: 2
12
env:
23
- GO111MODULE=on
34
before:
@@ -36,28 +37,29 @@ checksum:
3637
name_template: "{{ .ProjectName }}-checksums.txt"
3738
snapshot:
3839
name_template: "{{ .Tag }}-next"
39-
brews:
40-
- repository:
40+
homebrew_casks:
41+
- name: hookdeck
42+
repository:
4143
owner: hookdeck
4244
name: homebrew-hookdeck
4345
commit_author:
4446
name: hookdeck
4547
email: support@hookdeck.com
4648
homepage: https://hookdeck.com
4749
description: Hookdeck CLI utility
48-
install: |
49-
bin.install "hookdeck"
50-
rm Dir["#{bin}/{hookdeck-completion.bash,hookdeck-completion.zsh}"]
51-
system bin/"hookdeck", "completion", "--shell", "bash"
52-
system bin/"hookdeck", "completion", "--shell", "zsh"
53-
bash_completion.install "hookdeck-completion.bash"
54-
zsh_completion.install "hookdeck-completion.zsh"
55-
(zsh_completion/"_hookdeck").write <<~EOS
56-
#compdef hookdeck
57-
_hookdeck () {
58-
local e
59-
e=$(dirname ${funcsourcetrace[1]%:*})/hookdeck-completion.zsh
60-
if [[ -f $e ]]; then source $e; fi
61-
}
62-
EOS
6350
caveats: "❤ Thanks for installing the Hookdeck CLI! If this is your first time using the CLI, be sure to run `hookdeck login` first."
51+
custom_block: |
52+
postflight do
53+
system "hookdeck", "completion", "--shell", "bash"
54+
system "hookdeck", "completion", "--shell", "zsh"
55+
bash_completion.install "hookdeck-completion.bash"
56+
zsh_completion.install "hookdeck-completion.zsh"
57+
(zsh_completion/"_hookdeck").write <<~EOS
58+
#compdef hookdeck
59+
_hookdeck () {
60+
local e
61+
e=$(dirname ${funcsourcetrace[1]%:*})/hookdeck-completion.zsh
62+
if [[ -f $e ]]; then source $e; fi
63+
}
64+
EOS
65+
end

.goreleaser/windows-npm.yml

Lines changed: 0 additions & 45 deletions
This file was deleted.

.goreleaser/windows.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
version: 2
12
env:
23
- GO111MODULE=on
34
before:
@@ -40,6 +41,7 @@ scoops:
4041
- repository:
4142
owner: hookdeck
4243
name: scoop-hookdeck
44+
name: "{{ if .Prerelease }}hookdeck-beta{{ else }}hookdeck{{ end }}"
4345
commit_author:
4446
name: hookdeck-ci
4547
email: support@hookdeck.com

0 commit comments

Comments
 (0)