From 859b3e9678d28ef6721559a7fdb14ecdb3508efe Mon Sep 17 00:00:00 2001 From: patrikx3 Date: Tue, 21 May 2024 08:24:13 +0200 Subject: [PATCH] r0b08x [chore] 5/21/2024, 8:24:13 AM --- .github/workflows/macos-test.yml | 50 ++++++++++---------------------- package.json | 6 ++-- 2 files changed, 18 insertions(+), 38 deletions(-) diff --git a/.github/workflows/macos-test.yml b/.github/workflows/macos-test.yml index 9947b67..c4bc81b 100644 --- a/.github/workflows/macos-test.yml +++ b/.github/workflows/macos-test.yml @@ -24,47 +24,27 @@ jobs: - name: Install dependencies run: npm install - - name: Decode certificates and profiles - run: | - echo "${{ secrets.MAS_CERTIFICATE_P12 }}" | base64 --decode > mac_app.p12 - echo "${{ secrets.MAS_INSTALLER_CERTIFICATE_P12 }}" | base64 --decode > mac_installer.p12 - echo "${{ secrets.MAS_PROVISIONING_PROFILE }}" | base64 --decode > p3xredisui.provisionprofile - echo "${{ secrets.CERTIFICATE_P12_BASE64 }}" | base64 --decode > certificate.p12 - - name: Install Certificate - run: | - security create-keychain -p actions build.keychain - security default-keychain -s build.keychain - security unlock-keychain -p actions build.keychain - security import mac_app.p12 -k build.keychain -P "$MAS_CERTIFICATE_PASSWORD" -T /usr/bin/codesign - security import mac_installer.p12 -k build.keychain -P "$MAS_INSTALLER_CERTIFICATE_PASSWORD" -T /usr/bin/productsign - security import certificate.p12 -k build.keychain -P "$CERTIFICATE_P12_PASSWORD" -T /usr/bin/codesign - security set-key-partition-list -S apple-tool:,apple: -s -k actions build.keychain + - name: Decode and Install Certificates env: CERTIFICATE_P12_BASE64: ${{ secrets.CERTIFICATE_P12_BASE64 }} CERTIFICATE_P12_PASSWORD: ${{ secrets.CERTIFICATE_P12_PASSWORD }} - MAS_CERTIFICATE_PASSWORD: ${{ secrets.CERTIFICATE_P12_PASSWORD }} - MAS_INSTALLER_CERTIFICATE_PASSWORD: ${{ secrets.CERTIFICATE_P12_PASSWORD }} - - - name: Setup Provisioning Profile run: | - mkdir -p ~/Library/MobileDevice/Provisioning\ Profiles - cp p3xredisui.provisionprofile ~/Library/MobileDevice/Provisioning\ Profiles/ - - name: List Keychain Identities - run: security find-identity -v - - name: Build MAS Package - run: npm run publish-macos + echo $CERTIFICATE_P12_BASE64 | base64 --decode > certificate.p12 + security create-keychain -p actions temp.keychain + security import certificate.p12 -k ~/Library/Keychains/temp.keychain -P "$CERTIFICATE_P12_PASSWORD" -T /usr/bin/codesign + security list-keychains -s temp.keychain + security default-keychain -s temp.keychain + security unlock-keychain -p actions temp.keychain + security set-key-partition-list -S apple-tool:,apple: -s -k actions temp.keychain + + - name: Build and package macOS app env: - CSC_LINK: file://mac_app.p12 - CSC_KEY_PASSWORD: ${{ secrets.CERTIFICATE_P12_PASSWORD }} - CSC_INSTALLER_LINK: file://mac_installer.p12 - CSC_INSTALLER_KEY_PASSWORD: ${{ secrets.CERTIFICATE_P12_PASSWORD }} - CSC_PROVISIONING_PROFILE: $(pwd)/p3xredisui.provisionprofile - APPLEID: ${{ secrets.APPLE_ID }} - APPLEIDPASS: ${{ secrets.APPLE_APP_SPECIFIC_PASSWORD }} - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + APPLE_ID: ${{ secrets.APPLE_ID }} + APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }} + APPLE_APP_SPECIFIC_PASSWORD: ${{ secrets.APPLE_APP_SPECIFIC_PASSWORD }} + DEBUG: "*" + run: npm run publish-macos - - name: List all files - run: ls -all -h dist - name: Upload Artifacts uses: actions/upload-artifact@v2 with: diff --git a/package.json b/package.json index 83e1494..f274fef 100644 --- a/package.json +++ b/package.json @@ -124,13 +124,13 @@ "icon": "../src/electron/images/", "target": "appimage" }, - "mac": { - + "mac": { "category": "public.app-category.developer-tools", "hardenedRuntime": true, "icon": "artifacts/apple/icons/redis.icns", "gatekeeperAssess": false, "identity": "Patrik László (3GB3S9SH84)", + "type": "distribution", "extendInfo": { "ElectronTeamID": "3GB3S9SH84" }, @@ -139,7 +139,7 @@ }, "target": [ { - "target": "default", + "target": "mas", "arch": [ "universal" ]