chore(build): add macOS signing secrets and validation
- Introduced new secrets for macOS signing in the build workflow. - Added validation to check for the presence of required secrets before proceeding with code signing setup.
This commit is contained in:
20
.github/workflows/build.yml
vendored
20
.github/workflows/build.yml
vendored
@@ -8,6 +8,17 @@ on:
|
|||||||
type: boolean
|
type: boolean
|
||||||
default: false
|
default: false
|
||||||
description: 'Whether to upload build artifacts'
|
description: 'Whether to upload build artifacts'
|
||||||
|
secrets:
|
||||||
|
MAC_CERT_P12_BASE64:
|
||||||
|
required: false
|
||||||
|
MAC_CERT_P12_PASSWORD:
|
||||||
|
required: false
|
||||||
|
APPLE_API_KEY_ID:
|
||||||
|
required: false
|
||||||
|
APPLE_API_ISSUER:
|
||||||
|
required: false
|
||||||
|
APPLE_API_KEY_P8_BASE64:
|
||||||
|
required: false
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
@@ -138,6 +149,15 @@ jobs:
|
|||||||
APPLE_API_ISSUER: ${{ secrets.APPLE_API_ISSUER }}
|
APPLE_API_ISSUER: ${{ secrets.APPLE_API_ISSUER }}
|
||||||
run: |
|
run: |
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
|
# Check if all required secrets are present
|
||||||
|
if [[ -z "$MAC_CERT_P12_BASE64" ]] || [[ -z "$MAC_CERT_P12_PASSWORD" ]] || \
|
||||||
|
[[ -z "$APPLE_API_KEY_ID" ]] || [[ -z "$APPLE_API_ISSUER" ]] || \
|
||||||
|
[[ -z "$APPLE_API_KEY_P8_BASE64" ]]; then
|
||||||
|
echo "::notice::macOS signing secrets not available, skipping code signing setup"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
CERT_PATH="$RUNNER_TEMP/mac_cert.p12"
|
CERT_PATH="$RUNNER_TEMP/mac_cert.p12"
|
||||||
KEYCHAIN_PATH="$RUNNER_TEMP/build.keychain"
|
KEYCHAIN_PATH="$RUNNER_TEMP/build.keychain"
|
||||||
API_KEY_PATH="$RUNNER_TEMP/AuthKey.p8"
|
API_KEY_PATH="$RUNNER_TEMP/AuthKey.p8"
|
||||||
|
|||||||
1
.github/workflows/release.yml
vendored
1
.github/workflows/release.yml
vendored
@@ -10,6 +10,7 @@ jobs:
|
|||||||
uses: ./.github/workflows/build.yml
|
uses: ./.github/workflows/build.yml
|
||||||
with:
|
with:
|
||||||
upload_artifacts: true
|
upload_artifacts: true
|
||||||
|
secrets: inherit
|
||||||
|
|
||||||
release:
|
release:
|
||||||
needs: [build]
|
needs: [build]
|
||||||
|
|||||||
Reference in New Issue
Block a user