Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Universal Binary, Sign, and Notarize for macOS #120

Merged
merged 2 commits into from
Jan 9, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 50 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,13 @@ on:


jobs:
releases-matrix:
name: Release Go Binaries
release-linux-windows:
name: Release for Linux and Windows
runs-on: ubuntu-latest
strategy:
matrix:
goos: [darwin, linux, windows]
goos: [linux, windows]
goarch: [amd64, arm64]
exclude:
- goos: windows
goarch: arm64
steps:

- uses: actions/checkout@v4
Expand All @@ -30,4 +27,50 @@ jobs:
project_path: "./cmd/"
extra_files: README.md LICENSE
md5sum: FALSE
sha256sum: TRUE
sha256sum: FALSE


release-macos:
name: Release for macOS
runs-on: macos-latest
steps:

- uses: actions/checkout@v4

- uses: actions/setup-go@v5
with:
go-version-file: go.mod

- name: Compile ARM64
run: |
GOOS=darwin GOARCH=arm64 make compile
mv ./delete-dynamodb-items ./delete-dynamodb-items-arm64

- name: Compile AMD4
run: |
GOOS=darwin GOARCH=amd64 make compile
mv ./delete-dynamodb-items ./delete-dynamodb-items-amd64

- name: Universal binary
run: lipo -create -output delete-dynamodb-items ./delete-dynamodb-items-arm64 ./delete-dynamodb-items-amd64

- uses: apple-actions/import-codesign-certs@v3
with:
p12-file-base64: ${{ secrets.CERTIFICATES_P12 }}
p12-password: ${{ secrets.CERTIFICATES_P12_PASSWORD }}

- uses: halprin/macos-sign-package-notarize@v1
with:
path-to-binary: ./delete-dynamodb-items
signing-identity: ${{ secrets.SIGNING_IDENTITY }}
apple-id: ${{ secrets.APPLE_ID }}
app-specific-password: ${{ secrets.APP_SPECIFIC_PASSWORD }}
apple-developer-team-id: ${{ secrets.APPLE_DEVELOPER_TEAM_ID }}
extra-files: README.md LICENSE
archive-disk-name: Delete DynamoDB Items
archive-file-path: ./delete-dynamodb-items-${{ github.event.release.tag_name }}-macos.dmg

- name: Upload Release Asset
run: gh release upload ${{ github.event.release.tag_name }} ./delete-dynamodb-items-${{ github.event.release.tag_name }}-macos.dmg --clobber
env:
GH_TOKEN: ${{ github.token }}
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*.dll
*.so
*.dylib
/delete-dynamodb-items
/delete-dynamodb-items*

# Test binary, built with `go test -c`
*.test
Expand Down
Loading