Conversation
Comment on lines
+10
to
+103
| runs-on: macos-14 | ||
| timeout-minutes: 60 | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: '20' | ||
| cache: 'npm' | ||
|
|
||
| - uses: dtolnay/rust-toolchain@stable | ||
| with: | ||
| targets: aarch64-apple-darwin | ||
|
|
||
| - uses: Swatinem/rust-cache@v2 | ||
| with: | ||
| workspaces: | | ||
| . | ||
| apps/desktop/src-tauri | ||
|
|
||
| - name: Install GStreamer & GLib | ||
| run: brew install gstreamer glib pkg-config | ||
|
|
||
| - name: Import code signing certificate | ||
| env: | ||
| APPLE_CERTIFICATE: ${{ secrets.APPLE_CERTIFICATE }} | ||
| APPLE_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }} | ||
| KEYCHAIN_PASSWORD: ${{ secrets.KEYCHAIN_PASSWORD }} | ||
| run: | | ||
| KEYCHAIN_PATH="$RUNNER_TEMP/build.keychain-db" | ||
| CERT_PATH="$RUNNER_TEMP/cert.p12" | ||
|
|
||
| security create-keychain -p "$KEYCHAIN_PASSWORD" "$KEYCHAIN_PATH" | ||
| security set-keychain-settings -lut 21600 "$KEYCHAIN_PATH" | ||
| security unlock-keychain -p "$KEYCHAIN_PASSWORD" "$KEYCHAIN_PATH" | ||
|
|
||
| echo -n "$APPLE_CERTIFICATE" | base64 --decode -o "$CERT_PATH" | ||
| security import "$CERT_PATH" -P "$APPLE_CERTIFICATE_PASSWORD" \ | ||
| -A -t cert -f pkcs12 -k "$KEYCHAIN_PATH" | ||
| security set-key-partition-list -S apple-tool:,apple:,codesign: \ | ||
| -s -k "$KEYCHAIN_PASSWORD" "$KEYCHAIN_PATH" | ||
|
|
||
| security list-keychain -d user -s "$KEYCHAIN_PATH" login.keychain | ||
| security default-keychain -s "$KEYCHAIN_PATH" | ||
|
|
||
| security find-identity -v -p codesigning "$KEYCHAIN_PATH" | ||
|
|
||
| - name: Install npm dependencies | ||
| run: npm ci | ||
|
|
||
| - name: Build, sign and notarize | ||
| env: | ||
| APPLE_SIGNING_IDENTITY: ${{ secrets.APPLE_SIGNING_IDENTITY }} | ||
| APPLE_ID: ${{ secrets.APPLE_ID }} | ||
| APPLE_PASSWORD: ${{ secrets.APPLE_PASSWORD }} | ||
| APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }} | ||
| APPLE_ENTITLEMENTS_PATH: ${{ github.workspace }}/apps/desktop/src-tauri/entitlements.plist | ||
| working-directory: apps/desktop | ||
| run: npm run tauri -- build --target aarch64-apple-darwin | ||
|
|
||
| - name: Verify signature and notarization | ||
| run: | | ||
| set -e | ||
| BUNDLE_DIR="target/aarch64-apple-darwin/release/bundle" | ||
| APP=$(ls -d "$BUNDLE_DIR"/macos/*.app | head -1) | ||
| DMG=$(ls "$BUNDLE_DIR"/dmg/*.dmg | head -1) | ||
|
|
||
| echo "==> App: $APP" | ||
| echo "==> DMG: $DMG" | ||
|
|
||
| codesign -dv --verbose=4 "$APP" 2>&1 | grep -E 'Authority|TeamIdentifier|Runtime|Identifier' | ||
| codesign --verify --deep --strict --verbose=2 "$APP" | ||
| spctl -a -vv -t exec "$APP" | ||
| xcrun stapler validate "$DMG" | ||
|
|
||
| - name: Upload DMG artifact | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: vessel-macos-arm64 | ||
| path: target/aarch64-apple-darwin/release/bundle/dmg/*.dmg | ||
| if-no-files-found: error | ||
|
|
||
| - name: Publish to GitHub Release | ||
| if: startsWith(github.ref, 'refs/tags/') | ||
| uses: softprops/action-gh-release@v2 | ||
| with: | ||
| files: target/aarch64-apple-darwin/release/bundle/dmg/*.dmg | ||
| draft: true | ||
| generate_release_notes: true | ||
|
|
||
| - name: Cleanup keychain | ||
| if: always() | ||
| run: security delete-keychain "$RUNNER_TEMP/build.keychain-db" || true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.