2023-02-08 16:08:17 +00:00
name : Build, Sign and Notarize Orbit
on :
pull_request :
paths :
- 'orbit/**.go'
# This allows a subsequently queued workflow run to interrupt previous runs
concurrency :
group : ${{ github.workflow }}-${{ github.head_ref || github.run_id}}
cancel-in-progress : true
defaults :
run :
# fail-fast using bash -eo pipefail. See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#exit-codes-and-error-action-preference
shell : bash
permissions :
contents : read
jobs :
build :
runs-on : macos-latest
steps :
- name : Checkout
uses : actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v2
- name : Import signing keys
env :
APPLE_APPLICATION_CERTIFICATE : ${{ secrets.APPLE_APPLICATION_CERTIFICATE }}
APPLE_APPLICATION_CERTIFICATE_PASSWORD : ${{ secrets.APPLE_APPLICATION_CERTIFICATE_PASSWORD }}
KEYCHAIN_PASSWORD : ${{ secrets.KEYCHAIN_PASSWORD }}
run : |
echo "$APPLE_APPLICATION_CERTIFICATE" | base64 --decode > certificate.p12
security create-keychain -p $KEYCHAIN_PASSWORD build.keychain
security default-keychain -s build.keychain
security unlock-keychain -p $KEYCHAIN_PASSWORD build.keychain
security import certificate.p12 -k build.keychain -P $APPLE_APPLICATION_CERTIFICATE_PASSWORD -T /usr/bin/codesign
security set-key-partition-list -S apple-tool:,apple:,codesign : -s -k $KEYCHAIN_PASSWORD build.keychain
security find-identity -vv
rm certificate.p12
- name : Set up Go
2023-06-23 19:38:42 +00:00
uses : actions/setup-go@v4.0.1
2023-02-08 16:08:17 +00:00
with :
2023-06-07 20:59:30 +00:00
go-version : 1.19 .10
2023-02-08 16:08:17 +00:00
- name : Build, codesign and notarize orbit
run : go run ./orbit/tools/build/build.go
env :
2023-06-02 21:23:23 +00:00
GITHUB_TOKEN : ${{ secrets.FLEET_RELEASE_GITHUB_PAT }}
2023-02-08 16:08:17 +00:00
AC_USERNAME : ${{ secrets.APPLE_USERNAME }}
AC_PASSWORD : ${{ secrets.APPLE_PASSWORD }}
AC_TEAM_ID : ${{ secrets.APPLE_TEAM_ID }}
CODESIGN_IDENTITY : 51049B247B25B3119FAE7E9C0CC4375A43E47237
- name : Upload orbit
2023-04-24 18:27:56 +00:00
uses : actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v2
2023-02-08 16:08:17 +00:00
with :
name : orbit
path : |
orbit-darwin