feat: add macOS notarization
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
This commit is contained in:
31
.github/workflows/build.yml
vendored
31
.github/workflows/build.yml
vendored
@@ -30,6 +30,15 @@ on:
|
||||
APPLE_CODESIGN_ID:
|
||||
description: Certificate ID for signing macOS builds
|
||||
required: false
|
||||
APPLE_NOTARIZE_APPLE_ID:
|
||||
description: Apple ID used for notarizing macOS builds
|
||||
required: false
|
||||
APPLE_NOTARIZE_TEAM_ID:
|
||||
description: Team ID used for notarizing macOS builds
|
||||
required: false
|
||||
APPLE_NOTARIZE_PASSWORD:
|
||||
description: Password used for notarizing macOS builds
|
||||
required: false
|
||||
CACHIX_AUTH_TOKEN:
|
||||
description: Private token for authenticating against Cachix cache
|
||||
required: false
|
||||
@@ -375,7 +384,25 @@ jobs:
|
||||
|
||||
sudo codesign --sign "$APPLE_CODESIGN_ID" --deep --force --entitlements "../program_info/App.entitlements" --options runtime "PrismLauncher.app/Contents/MacOS/prismlauncher"
|
||||
mv "PrismLauncher.app" "Prism Launcher.app"
|
||||
tar -czf ../PrismLauncher.tar.gz *
|
||||
|
||||
- name: Notarize (macOS)
|
||||
if: runner.os == 'macOS'
|
||||
run: |
|
||||
cd ${{ env.INSTALL_DIR }}
|
||||
|
||||
if [ -n '${{ secrets.APPLE_NOTARIZE_PASSWORD }}' ]; then
|
||||
ditto -c -k --sequesterRsrc --keepParent "Prism Launcher.app" ../PrismLauncher.zip
|
||||
xcrun notarytool submit ../PrismLauncher.zip \
|
||||
--wait --progress \
|
||||
--apple-id '${{ secrets.APPLE_NOTARIZE_APPLE_ID }}' \
|
||||
--team-id '${{ secrets.APPLE_NOTARIZE_TEAM_ID }}' \
|
||||
--password '${{ secrets.APPLE_NOTARIZE_PASSWORD }}'
|
||||
|
||||
xcrun stapler staple "Prism Launcher.app"
|
||||
else
|
||||
echo ":warning: Skipping notarization as credentials are not present." >> $GITHUB_STEP_SUMMARY
|
||||
fi
|
||||
ditto -c -k --sequesterRsrc --keepParent "Prism Launcher.app" ../PrismLauncher.zip
|
||||
|
||||
- name: Make Sparkle signature (macOS)
|
||||
if: matrix.name == 'macOS'
|
||||
@@ -550,7 +577,7 @@ jobs:
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: PrismLauncher-${{ matrix.name }}-${{ env.VERSION }}-${{ inputs.build_type }}
|
||||
path: PrismLauncher.tar.gz
|
||||
path: PrismLauncher.zip
|
||||
|
||||
- name: Upload binary zip (Windows)
|
||||
if: runner.os == 'Windows'
|
||||
|
||||
Reference in New Issue
Block a user