Skip to content

Commit

Permalink
Added notarization and fixed paths
Browse files Browse the repository at this point in the history
  • Loading branch information
tmoroney committed Nov 24, 2024
1 parent 8c86407 commit 0a226b2
Showing 1 changed file with 24 additions and 3 deletions.
27 changes: 24 additions & 3 deletions .github/workflows/package-mac.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Package Tauri App and Python Server for MacOS
name: Package AutoSubs for MacOS
on:
push:
branches:
Expand Down Expand Up @@ -32,6 +32,10 @@ jobs:
INSTALLER_CERTIFICATE_BASE64: ${{ secrets.APPLE_INSTALLER_CERTIFICATE }}
INSTALLER_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }}
KEYCHAIN_PASSWORD: ${{ secrets.KEYCHAIN_PASSWORD }}
APPLE_NOTARIZE_KEY: ${{ secrets.APPLE_NOTARIZE_KEY }}
APPLE_NOTARIZE_ID: ${{ secrets.APPLE_NOTARIZE_ID }}
APPLE_ISSUER: ${{ secrets.APPLE_ISSUER }}

run: |
# Define paths
APP_CERT_PATH=$RUNNER_TEMP/app_certificate.p12
Expand All @@ -55,6 +59,13 @@ jobs:
# Import Installer certificate
security import $INSTALLER_CERT_PATH -P "$INSTALLER_CERTIFICATE_PASSWORD" -A -t cert -f pkcs12 -k $KEYCHAIN_PATH
security set-key-partition-list -S apple-tool:,apple: -s -k "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH
# Import Notarization credentials
echo "$APPLE_NOTARIZE_KEY" | base64 --decode > Notarization_AuthKey.p8
xcrun notarytool store-credentials "AC_PASSWORD" \
--key "Notarization_AuthKey.p8" \
--key-id "$APPLE_NOTARIZE_ID" \
--issuer "$APPLE_ISSUER"
- name: Install Dependencies
run: |
Expand Down Expand Up @@ -105,8 +116,8 @@ jobs:
- name: Move Python Server and App to Output Folder
run: |
mv AutoSubs-App/src-tauri/target/release/bundle/macos/AutoSubs.app Output/AutoSubs/
mv Mac-Server/dist/Transcription-Server Output/AutoSubs/
mv "AutoSubs-App/src-tauri/target/release/bundle/macos/AutoSubs.app" "Output/AutoSubs"
mv "Mac-Server/dist/Transcription-Server" "Output/AutoSubs"
- name: Create PKG Installer
run: |
Expand All @@ -123,6 +134,16 @@ jobs:
"AutoSubs-unsigned.pkg" \
"AutoSubs-Installer.pkg"
- name: Notarize PKG Installer
run: |
# Submit for notarization
xcrun notarytool submit "AutoSubs-Installer.pkg" \
--keychain-profile "AC_PASSWORD" \
--wait
# Staple the ticket to the installer
xcrun stapler staple "AutoSubs-Installer.pkg"
- name: Get Latest Release Tag
id: get_latest_release
env:
Expand Down

0 comments on commit 0a226b2

Please sign in to comment.