darwin build signing (#70)

This commit is contained in:
Michael Quigley 2022-11-08 11:08:17 -05:00
parent bb719ac3ab
commit 604c7c0e7b
No known key found for this signature in database
GPG Key ID: 9B60314A9DD20A62
4 changed files with 51 additions and 2 deletions

View File

@ -50,6 +50,16 @@ jobs:
build-darwin:
runs-on: macos-latest
steps:
- name: import distribution cert
uses: apple-actions/import-codesign-certs@v1
with:
p12-file-base64: ${{ secrets.APPLE_DEVELOPER_CERTIFICATE_P12_BASE64 }}
p12-password: ${{ secrets.APPLE_DEVELOPER_CERTIFICATE_PASSWORD }}
- run: |
brew tap mitchellh/gon
brew install mitchellh/gon/gon
- uses: actions/checkout@v3
with:
fetch-depth: 0
@ -80,6 +90,8 @@ jobs:
args: release --skip-publish --config .goreleaser-darwin.yml
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
AC_USERNAME: ${{ secrets.AC_USERNAME }}
AC_PASSWORD: ${{ secrets.AC_PASSWORD }}
- uses: actions/upload-artifact@v3
with:

View File

@ -1,5 +1,6 @@
builds:
- main: ./cmd/zrok
- id: zrok-amd64
main: ./cmd/zrok
binary: zrok
ldflags: "-s -w -X github.com/openziti-test-kitchen/zrok/build.Version={{.Tag}} -X github.com/openziti-test-kitchen/zrok/build.Hash={{.ShortCommit}}"
env:
@ -8,4 +9,18 @@ builds:
- darwin
goarch:
- amd64
- arm64
hooks:
post: gon build/gon-amd64.hcl
- id: zrok-arm64
main: ./cmd/zrok
binary: zrok
ldflags: "-s -w -X github.com/openziti-test-kitchen/zrok/build.Version={{.Tag}} -X github.com/openziti-test-kitchen/zrok/build.Hash={{.ShortCommit}}"
env:
- CGO_ENABLED=1
goos:
- darwin
goarch:
- arm64
hooks:
post: gon build/gon-arm64.hcl

11
build/gon-amd64.hcl Normal file
View File

@ -0,0 +1,11 @@
source = ["dist/zrok-amd64_darwin_amd64_v1/zrok"]
bundle_id = "io.zrok.zrok"
apple_id {
username = "@env:AC_USERNAME"
password = "@env:AC_PASSWORD"
}
sign {
application_identity = "Apple Distribution: NetFoundry Inc"
}

11
build/gon-arm64.hcl Normal file
View File

@ -0,0 +1,11 @@
source = ["dist/zrok-arm64_darwin_arm64/zrok"]
bundle_id = "io.zrok.zrok"
apple_id {
username = "@env:AC_USERNAME"
password = "@env:AC_PASSWORD"
}
sign {
application_identity = "Apple Distribution: NetFoundry Inc"
}