mirror of
https://github.com/jcefmaven/jcefbuild.git
synced 2025-09-17 12:56:37 +08:00
Introduce code signing to all macosx builds
This commit is contained in:
parent
b0596832ca
commit
2e95840055
54
.github/workflows/build-all.yml
vendored
54
.github/workflows/build-all.yml
vendored
@ -242,11 +242,36 @@ jobs:
|
||||
run: |
|
||||
chmod +x scripts/install_macos_dependencies.sh
|
||||
./scripts/install_macos_dependencies.sh
|
||||
- name: Install Apple certificate
|
||||
env:
|
||||
BUILD_CERTIFICATE_BASE64: ${{ secrets.APPLE_BUILD_CERTIFICATE_BASE64 }}
|
||||
P12_PASSWORD: ${{ secrets.APPLE_P12_PASSWORD }}
|
||||
KEYCHAIN_PASSWORD: ${{ secrets.APPLE_KEYCHAIN_PASSWORD }}
|
||||
run: |
|
||||
# create variables
|
||||
CERTIFICATE_PATH=$RUNNER_TEMP/build_certificate.p12
|
||||
KEYCHAIN_PATH=$RUNNER_TEMP/app-signing.keychain-db
|
||||
|
||||
# import certificate from secrets
|
||||
echo -n "$BUILD_CERTIFICATE_BASE64" | base64 --decode --output $CERTIFICATE_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 -T /usr/bin/codesign
|
||||
security list-keychain -d user -s $KEYCHAIN_PATH
|
||||
-
|
||||
name: Build
|
||||
run: |
|
||||
chmod +x compile_macosx.sh
|
||||
./compile_macosx.sh amd64 Release ${{ github.event.inputs.repo }} ${{ github.event.inputs.ref }}
|
||||
./compile_macosx.sh amd64 Release ${{ github.event.inputs.repo }} ${{ github.event.inputs.ref }} "${{ secrets.APPLE_BUILD_CERTIFICATE_NAME }}"
|
||||
- name: Clean up keychain
|
||||
if: ${{ always() }}
|
||||
run: |
|
||||
security delete-keychain $RUNNER_TEMP/app-signing.keychain-db
|
||||
- name: Export distribution
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
@ -277,11 +302,36 @@ jobs:
|
||||
run: |
|
||||
chmod +x scripts/install_macos_dependencies.sh
|
||||
./scripts/install_macos_dependencies.sh
|
||||
- name: Install Apple certificate
|
||||
env:
|
||||
BUILD_CERTIFICATE_BASE64: ${{ secrets.APPLE_BUILD_CERTIFICATE_BASE64 }}
|
||||
P12_PASSWORD: ${{ secrets.APPLE_P12_PASSWORD }}
|
||||
KEYCHAIN_PASSWORD: ${{ secrets.APPLE_KEYCHAIN_PASSWORD }}
|
||||
run: |
|
||||
# create variables
|
||||
CERTIFICATE_PATH=$RUNNER_TEMP/build_certificate.p12
|
||||
KEYCHAIN_PATH=$RUNNER_TEMP/app-signing.keychain-db
|
||||
|
||||
# import certificate from secrets
|
||||
echo -n "$BUILD_CERTIFICATE_BASE64" | base64 --decode --output $CERTIFICATE_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 -T /usr/bin/codesign
|
||||
security list-keychain -d user -s $KEYCHAIN_PATH
|
||||
-
|
||||
name: Build
|
||||
run: |
|
||||
chmod +x compile_macosx.sh
|
||||
./compile_macosx.sh arm64 Release ${{ github.event.inputs.repo }} ${{ github.event.inputs.ref }}
|
||||
./compile_macosx.sh arm64 Release ${{ github.event.inputs.repo }} ${{ github.event.inputs.ref }} "${{ secrets.APPLE_BUILD_CERTIFICATE_NAME }}"
|
||||
- name: Clean up keychain
|
||||
if: ${{ always() }}
|
||||
run: |
|
||||
security delete-keychain $RUNNER_TEMP/app-signing.keychain-db
|
||||
- name: Export distribution
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
|
27
.github/workflows/build-macosx-arm64.yml
vendored
27
.github/workflows/build-macosx-arm64.yml
vendored
@ -22,11 +22,36 @@ jobs:
|
||||
run: |
|
||||
chmod +x scripts/install_macos_dependencies.sh
|
||||
./scripts/install_macos_dependencies.sh
|
||||
- name: Install Apple certificate
|
||||
env:
|
||||
BUILD_CERTIFICATE_BASE64: ${{ secrets.APPLE_BUILD_CERTIFICATE_BASE64 }}
|
||||
P12_PASSWORD: ${{ secrets.APPLE_P12_PASSWORD }}
|
||||
KEYCHAIN_PASSWORD: ${{ secrets.APPLE_KEYCHAIN_PASSWORD }}
|
||||
run: |
|
||||
# create variables
|
||||
CERTIFICATE_PATH=$RUNNER_TEMP/build_certificate.p12
|
||||
KEYCHAIN_PATH=$RUNNER_TEMP/app-signing.keychain-db
|
||||
|
||||
# import certificate from secrets
|
||||
echo -n "$BUILD_CERTIFICATE_BASE64" | base64 --decode --output $CERTIFICATE_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 -T /usr/bin/codesign
|
||||
security list-keychain -d user -s $KEYCHAIN_PATH
|
||||
-
|
||||
name: Build
|
||||
run: |
|
||||
chmod +x compile_macosx.sh
|
||||
./compile_macosx.sh arm64 Release ${{ github.event.inputs.repo }} ${{ github.event.inputs.ref }}
|
||||
./compile_macosx.sh arm64 Release ${{ github.event.inputs.repo }} ${{ github.event.inputs.ref }} "${{ secrets.APPLE_BUILD_CERTIFICATE_NAME }}"
|
||||
- name: Clean up keychain
|
||||
if: ${{ always() }}
|
||||
run: |
|
||||
security delete-keychain $RUNNER_TEMP/app-signing.keychain-db
|
||||
-
|
||||
name: Export artifacts
|
||||
uses: actions/upload-artifact@v2
|
||||
|
Loading…
Reference in New Issue
Block a user