Skip to content

Commit b190bb9

Browse files
committed
configure darwin build with code signing
man, what a goddammed pain in the ass.
1 parent aaf0493 commit b190bb9

2 files changed

Lines changed: 34 additions & 3 deletions

File tree

.github/workflows/publish.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,11 @@ jobs:
3838
env:
3939
GITHUB_TOKEN: ${{ secrets.GH_PAT }}
4040
CHOCOLATEY_API_KEY: ${{ secrets.CHOCOLATEY_API_KEY }}
41+
MACOS_SIGN_P12: ${{ secrets.MACOS_SIGN_P12 }}
42+
MACOS_SIGN_PASSWORD: ${{ secrets.MACOS_SIGN_PASSWORD }}
43+
MACOS_NOTARY_ISSUER_ID: ${{ secrets.MACOS_NOTARY_ISSUER_ID }}
44+
MACOS_NOTARY_KEY_ID: ${{ secrets.MACOS_NOTARY_KEY_ID }}
45+
MACOS_NOTARY_KEY: ${{ secrets.MACOS_NOTARY_KEY }}
4146

4247
publish_npm:
4348
if: success() || failure()

.goreleaser.yaml

Lines changed: 29 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,24 @@ before:
55
# You may remove this if you don't use go modules.
66
- go mod tidy
77
builds:
8-
- env:
8+
- id: default
9+
env:
910
- CGO_ENABLED=0
1011
goos:
1112
- linux
1213
- windows
13-
- darwin
1414
goarch:
1515
- amd64
1616
- arm64
1717
- "386"
18+
- id: darwin
19+
env:
20+
- CGO_ENABLED=0
21+
goos:
22+
- darwin
23+
goarch:
24+
- amd64
25+
- arm64
1826
archives:
1927
- name_template: >-
2028
{{ .ProjectName }}_
@@ -32,6 +40,21 @@ changelog:
3240
exclude:
3341
- '^docs:'
3442
- '^test:'
43+
notarize:
44+
macos:
45+
- enabled: '{{ isEnvSet "MACOS_SIGN_P12" }}'
46+
ids:
47+
- darwin
48+
sign:
49+
certificate: "{{.Env.MACOS_SIGN_P12}}"
50+
password: "{{.Env.MACOS_SIGN_PASSWORD}}"
51+
notarize:
52+
issuer_id: "{{.Env.MACOS_NOTARY_ISSUER_ID}}"
53+
key_id: "{{.Env.MACOS_NOTARY_KEY_ID}}"
54+
key: "{{.Env.MACOS_NOTARY_KEY}}"
55+
wait: true
56+
timeout: 20m
57+
3558
homebrew_casks:
3659
- repository:
3760
owner: pb33f
@@ -44,7 +67,10 @@ homebrew_casks:
4467
homepage: "https://pb33f.io/openapi-changes"
4568
description: "The worlds sexiest OpenAPI diffing and change detection engine"
4669

47-
binary: openapi-changes
70+
hooks:
71+
post:
72+
install: |
73+
system_command "/usr/bin/xattr", args: ["-dr", "com.apple.quarantine", "#{staged_path}/openapi-changes"]
4874
4975
snapshot:
5076
version_template: "{{ .Tag }}"

0 commit comments

Comments
 (0)