Skip to content

Commit da3f938

Browse files
authored
Merge pull request #120 from halprin/sign-notarize
Universal Binary, Sign, and Notarize for macOS
2 parents f7a56f0 + a6a7747 commit da3f938

2 files changed

Lines changed: 51 additions & 8 deletions

File tree

.github/workflows/release.yml

Lines changed: 50 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,13 @@ on:
77

88

99
jobs:
10-
releases-matrix:
11-
name: Release Go Binaries
10+
release-linux-windows:
11+
name: Release for Linux and Windows
1212
runs-on: ubuntu-latest
1313
strategy:
1414
matrix:
15-
goos: [darwin, linux, windows]
15+
goos: [linux, windows]
1616
goarch: [amd64, arm64]
17-
exclude:
18-
- goos: windows
19-
goarch: arm64
2017
steps:
2118

2219
- uses: actions/checkout@v4
@@ -30,4 +27,50 @@ jobs:
3027
project_path: "./cmd/"
3128
extra_files: README.md LICENSE
3229
md5sum: FALSE
33-
sha256sum: TRUE
30+
sha256sum: FALSE
31+
32+
33+
release-macos:
34+
name: Release for macOS
35+
runs-on: macos-latest
36+
steps:
37+
38+
- uses: actions/checkout@v4
39+
40+
- uses: actions/setup-go@v5
41+
with:
42+
go-version-file: go.mod
43+
44+
- name: Compile ARM64
45+
run: |
46+
GOOS=darwin GOARCH=arm64 make compile
47+
mv ./delete-dynamodb-items ./delete-dynamodb-items-arm64
48+
49+
- name: Compile AMD4
50+
run: |
51+
GOOS=darwin GOARCH=amd64 make compile
52+
mv ./delete-dynamodb-items ./delete-dynamodb-items-amd64
53+
54+
- name: Universal binary
55+
run: lipo -create -output delete-dynamodb-items ./delete-dynamodb-items-arm64 ./delete-dynamodb-items-amd64
56+
57+
- uses: apple-actions/import-codesign-certs@v3
58+
with:
59+
p12-file-base64: ${{ secrets.CERTIFICATES_P12 }}
60+
p12-password: ${{ secrets.CERTIFICATES_P12_PASSWORD }}
61+
62+
- uses: halprin/macos-sign-package-notarize@v1
63+
with:
64+
path-to-binary: ./delete-dynamodb-items
65+
signing-identity: ${{ secrets.SIGNING_IDENTITY }}
66+
apple-id: ${{ secrets.APPLE_ID }}
67+
app-specific-password: ${{ secrets.APP_SPECIFIC_PASSWORD }}
68+
apple-developer-team-id: ${{ secrets.APPLE_DEVELOPER_TEAM_ID }}
69+
extra-files: README.md LICENSE
70+
archive-disk-name: Delete DynamoDB Items
71+
archive-file-path: ./delete-dynamodb-items-${{ github.event.release.tag_name }}-macos.dmg
72+
73+
- name: Upload Release Asset
74+
run: gh release upload ${{ github.event.release.tag_name }} ./delete-dynamodb-items-${{ github.event.release.tag_name }}-macos.dmg --clobber
75+
env:
76+
GH_TOKEN: ${{ github.token }}

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*.dll
55
*.so
66
*.dylib
7-
/delete-dynamodb-items
7+
/delete-dynamodb-items*
88

99
# Test binary, built with `go test -c`
1010
*.test

0 commit comments

Comments
 (0)