Skip to content

Commit

Permalink
update(ci): fixes for github workflows desktop
Browse files Browse the repository at this point in the history
  • Loading branch information
luisecm committed Sep 28, 2024
1 parent d622dc9 commit 73d3668
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 53 deletions.
11 changes: 5 additions & 6 deletions .github/workflows/build-release-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/[email protected]
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
54 changes: 7 additions & 47 deletions .github/workflows/build-release-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/[email protected]
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

0 comments on commit 73d3668

Please sign in to comment.