diff options
| author | Yong He <yonghe@outlook.com> | 2022-06-15 14:03:40 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-06-15 14:03:40 -0700 |
| commit | c8dc01436473ff2eb4ab4f219804d474720b02fe (patch) | |
| tree | 280131c953593d6e056504288f88ae2bfc74099b /.github | |
| parent | 69cb218100f593036d1a89357303f9c1368841ea (diff) | |
Sign macos binaries.
Diffstat (limited to '.github')
| -rw-r--r-- | .github/workflows/macos.yml | 33 |
1 files changed, 29 insertions, 4 deletions
diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 2feb44712..d14c25c2f 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -7,7 +7,7 @@ on: branches: [ master ] jobs: - build: + build_with_signing: name: MacOS Build CI runs-on: macos-latest @@ -23,7 +23,34 @@ jobs: with: submodules: 'true' fetch-depth: '0' - + - name: Install the Apple certificate and provisioning profile + env: + BUILD_CERTIFICATE_BASE64: ${{ secrets.BUILD_CERTIFICATE_BASE64 }} + P12_PASSWORD: ${{ secrets.P12_PASSWORD }} + BUILD_PROVISION_PROFILE_BASE64: ${{ secrets.BUILD_PROVISION_PROFILE_BASE64 }} + KEYCHAIN_PASSWORD: ${{ secrets.KEYCHAIN_PASSWORD }} + run: | + # create variables + CERTIFICATE_PATH=$RUNNER_TEMP/build_certificate.p12 + PP_PATH=$RUNNER_TEMP/build_pp.provisionprofile + KEYCHAIN_PATH=$RUNNER_TEMP/app-signing.keychain-db + + # import certificate and provisioning profile from secrets + echo -n "$BUILD_CERTIFICATE_BASE64" | base64 --decode --output $CERTIFICATE_PATH + echo -n "$BUILD_PROVISION_PROFILE_BASE64" | base64 --decode --output $PP_PATH + + # create temporary keychain + security create-keychain -p "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH + security set-keychain-settings -lut 21600 $KEYCHAIN_PATH + security unlock-keychain -p "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH + + # import certificate to keychain + security import $CERTIFICATE_PATH -P "$P12_PASSWORD" -A -t cert -f pkcs12 -k $KEYCHAIN_PATH + security list-keychain -d user -s $KEYCHAIN_PATH + + # apply provisioning profile + mkdir -p ~/Library/MobileDevice/Provisioning\ Profiles + cp $PP_PATH ~/Library/MobileDevice/Provisioning\ Profiles - name: build run: CC=${{matrix.compiler}} @@ -37,8 +64,6 @@ jobs: bin/**/slangc bin/**/slangd bin/**/libslang.dylib - bin/**/libslang-llvm.dylib - bin/**/libslang-glslang.dylib - name: test run: CONFIGURATION=${{matrix.configuration}} |
