Skip to content

Chore

Chore #8

Workflow file for this run

name: Rust CI Mac
on:
workflow_dispatch:
pull_request:
push:
branches:
- ci
tags:
- "v*"
jobs:
build-macos:
runs-on: macos-latest
env:
APPLE_ID: ${{ secrets.APPLE_ID }}
APPLE_ID_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }}
steps:
- name: Install Rust stable
uses: dtolnay/rust-toolchain@stable
- uses: apple-actions/import-codesign-certs@v3
with:
p12-file-base64: ${{ secrets.APPLE_CERTIFICATE }}
p12-password: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }}
keychain: build
- name: Verify Certificate
run: |
CERT_INFO=$(security find-identity -v -p codesigning build.keychain | grep "Developer ID Application")
CERT_ID=$(echo "$CERT_INFO" | awk -F'"' '{print $2}')
echo "CERT_ID=$CERT_ID" >> $GITHUB_ENV
echo "Certificate imported."
- name: Check out code
uses: actions/checkout@v4
- name: Prepare Tauri
run: |
npm install
npx tauri icon
- name: Tauri build
uses: tauri-apps/tauri-action@v0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
APPLE_CERTIFICATE: ${{ secrets.APPLE_CERTIFICATE }}
APPLE_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }}
APPLE_SIGNING_IDENTITY: ${{ env.CERT_ID }}
APPLE_ID: ${{ secrets.APPLE_ID }}
APPLE_PASSWORD: ${{ secrets.APPLE_PASSWORD }}
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
- name: Upload dmg artifact
uses: actions/upload-artifact@v4
with:
name: zcash-vote-audit.dmg
path: src-tauri/target/release/bundle/dmg/*.dmg
- name: Create Release
if: startsWith(github.ref_name, 'v')
uses: softprops/action-gh-release@v2
with:
files: src-tauri/target/release/bundle/dmg/*.dmg
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}