From 73d36688a5e452a660cff78369a1555ee320735b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luis=20Carden=CC=83a?= <35935591+luisecm@users.noreply.github.com> Date: Sat, 28 Sep 2024 00:19:33 -0600 Subject: [PATCH] update(ci): fixes for github workflows desktop --- .github/workflows/build-release-linux.yml | 11 +++-- .github/workflows/build-release-macos.yml | 54 +++-------------------- 2 files changed, 12 insertions(+), 53 deletions(-) diff --git a/.github/workflows/build-release-linux.yml b/.github/workflows/build-release-linux.yml index 159b3dd0c..29ef4d5ee 100644 --- a/.github/workflows/build-release-linux.yml +++ b/.github/workflows/build-release-linux.yml @@ -33,14 +33,13 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Calculate hashes + run: | + sha256sum src-tauri/target/release/bundle/deb/*.deb > src-tauri/target/release/bundle/deb/SHA256SUM + - name: Upload Ubuntu installer uses: actions/upload-artifact@v4.4.0 with: name: build-ubuntu - path: src-tauri/target/release/bundle/deb/*.deb + path: src-tauri/target/release/bundle/deb/ retention-days: 5 - - - name: Build Linux Installer - run: | - mv src-tauri/target/release/bundle/deb/*.deb src-tauri/target/release/bundle/deb/uplink.deb - bash build_linux_installer.sh uplink ${{ github.ref_name }} amd64 diff --git a/.github/workflows/build-release-macos.yml b/.github/workflows/build-release-macos.yml index 6c4073723..a518102df 100644 --- a/.github/workflows/build-release-macos.yml +++ b/.github/workflows/build-release-macos.yml @@ -28,56 +28,16 @@ jobs: - uses: tauri-apps/tauri-action@v0 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: Codesign and Build executable MacOS - continue-on-error: true - env: - MACOS_CERTIFICATE: ${{ secrets.MACOS_CERTIFICATE }} - MACOS_CERTIFICATE_PWD: ${{ secrets.MACOS_CERTIFICATE_PWD }} - MACOS_CERTIFICATE_NAME: ${{ secrets.MACOS_CERTIFICATE_NAME }} - MACOS_CI_KEYCHAIN_PWD: ${{ secrets.MACOS_KEYCHAIN_PASSWORD }} - MACOS_KEYCHAIN_NAME: ${{ secrets.MACOS_KEYCHAIN_NAME }} - MACOS_CERT_ID: ${{secrets.MACOS_CERT_ID}} - run: | - echo $MACOS_CERTIFICATE | base64 --decode > certificate.p12 - security create-keychain -p "$MACOS_CI_KEYCHAIN_PWD" builduplink.keychain - security default-keychain -s builduplink.keychain - security unlock-keychain -p "$MACOS_CI_KEYCHAIN_PWD" builduplink.keychain - security set-keychain-settings builduplink.keychain - security import certificate.p12 -k builduplink.keychain -P "$MACOS_CERTIFICATE_PWD" -T /usr/bin/codesign - security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k "$MACOS_CI_KEYCHAIN_PWD" builduplink.keychain - security find-identity -p codesigning -v - security list-keychains - codesign --deep --force --verify --verbose --sign "$MACOS_CERT_ID" ./src-tauri/target/release/bundle/macos/*.app - codesign --deep --force --verify --verbose --sign "$MACOS_CERT_ID" ./src-tauri/target/release/bundle/dmg/*.dmg - - - name: "Notarize executable MacOS" - env: - PROD_MACOS_NOTARIZATION_APPLE_ID: ${{ secrets.MACOS_NOTARIZATION_APPLE_ID }} - PROD_MACOS_NOTARIZATION_TEAM_ID: ${{ secrets.MACOS_NOTARIZATION_TEAM_ID }} - PROD_MACOS_NOTARIZATION_PWD: ${{ secrets.MACOS_NOTARIZATION_PWD }} - MACOS_CI_KEYCHAIN_PWD: ${{ secrets.MACOS_KEYCHAIN_PASSWORD }} - run: | - echo "Create keychain profile" - xcrun notarytool store-credentials "uplink-notarytool-profile" --apple-id "$PROD_MACOS_NOTARIZATION_APPLE_ID" --team-id "$PROD_MACOS_NOTARIZATION_TEAM_ID" --password "$PROD_MACOS_NOTARIZATION_PWD" - echo "Creating temp notarization archive" - ditto -c -k --keepParent "src-tauri/target/release/bundle/macos/Uplink.app" "notarization.zip" - echo "Notarize app" - xcrun notarytool submit "notarization.zip" --keychain-profile "uplink-notarytool-profile" --wait - echo "Attach staple" - xcrun stapler staple "src-tauri/target/release/bundle/macos/Uplink.app" - - - name: Create ZIP archive MacOS - run: | - ditto -c -k --sequesterRsrc --keepParent src-tauri/target/release/bundle/macos/Uplink.app Uplink-Mac-Universal.zip - - - name: Calculate hashes MacOS - run: | - shasum -a 256 Uplink-Mac-Universal.zip > Uplink-Mac-Universal.zip.sha256.txt + APPLE_CERTIFICATE: ${{ secrets.MACOS_CERTIFICATE }} + APPLE_CERTIFICATE_PASSWORD: ${{ secrets.MACOS_CERTIFICATE_PWD }} + APPLE_SIGNING_IDENTITY: ${{ secrets.MACOS_CERTIFICATE_NAME }} + APPLE_ID: ${{ secrets.MACOS_NOTARIZATION_APPLE_ID }} + APPLE_PASSWORD: ${{ secrets.MACOS_NOTARIZATION_PWD }} + APPLE_TEAM_ID: ${{ secrets.MACOS_NOTARIZATION_TEAM_ID }} - name: Upload signed macOS Installer uses: actions/upload-artifact@v4.4.0 with: name: build-macos-official - path: src-tauri/target/release/bundle/macos/Uplink-Mac-Universal.zip + path: src-tauri/target/release/bundle/ retention-days: 5