Skip to content

Commit f78290b

Browse files
committed
configure goreleaser for signing/notarization
1 parent 50e4847 commit f78290b

3 files changed

Lines changed: 20 additions & 8 deletions

File tree

.github/workflows/release.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,8 @@ jobs:
2525
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2626
HOMEBREW_TAP_GITHUB_TOKEN: ${{ secrets.HOMEBREW_TAP_GITHUB_TOKEN }}
2727
GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}
28+
MACOS_SIGN_P12: ${{ secrets.MACOS_SIGN_P12 }}
29+
MACOS_SIGN_PASSWORD: ${{ secrets.MACOS_SIGN_PASSWORD }}
30+
MACOS_NOTARY_KEY: ${{ secrets.MACOS_NOTARY_KEY }}
31+
MACOS_NOTARY_KEY_ID: ${{ secrets.MACOS_NOTARY_KEY_ID }}
32+
MACOS_NOTARY_ISSUER_ID: ${{ secrets.MACOS_NOTARY_ISSUER_ID }}

.goreleaser.yaml

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -48,16 +48,22 @@ homebrew_casks:
4848
homepage: https://loops.so
4949
description: Official CLI for Loops
5050
binaries: [loops]
51-
# TODO: remove this after we're signing the binary
52-
hooks:
53-
post:
54-
install: |
55-
if OS.mac?
56-
system_command "/usr/bin/xattr", args: ["-dr", "com.apple.quarantine", "#{staged_path}/loops"]
57-
end
5851

5952
release:
6053
prerelease: auto
6154

6255
changelog:
6356
use: github-native
57+
58+
notarize:
59+
macos:
60+
- enabled: '{{ isEnvSet "MACOS_SIGN_P12" }}'
61+
sign:
62+
certificate: "{{.Env.MACOS_SIGN_P12}}"
63+
password: "{{.Env.MACOS_SIGN_PASSWORD}}"
64+
notarize:
65+
issuer_id: "{{.Env.MACOS_NOTARY_ISSUER_ID}}"
66+
key_id: "{{.Env.MACOS_NOTARY_KEY_ID}}"
67+
key: "{{.Env.MACOS_NOTARY_KEY}}"
68+
wait: true
69+
timeout: 20m

Taskfile.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,9 @@ tasks:
5353

5454
release:local:
5555
desc: build with goreleaser
56+
dotenv: [.env.macos-signing]
5657
cmds:
57-
- goreleaser release --snapshot --clean
58+
- goreleaser release --snapshot --single-target --clean
5859

5960
release:check:
6061
cmds:

0 commit comments

Comments
 (0)