Skip to content

Merge branch 'dev'

Merge branch 'dev' #17

Workflow file for this run

name: Build
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
permissions:
contents: write
jobs:
build:
runs-on: macos-latest
outputs:
version: ${{ steps.version.outputs.version }}
steps:
- uses: actions/checkout@v4
- name: Read version from tauri.conf.json
id: version
run: echo "version=$(jq -r '.version' src-tauri/tauri.conf.json)" >> "$GITHUB_OUTPUT"
- name: Install macOS dependencies
run: brew install opus cmake
- uses: actions/setup-node@v4
with:
node-version: 22
cache: npm
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
targets: aarch64-apple-darwin
- uses: swatinem/rust-cache@v2
with:
workspaces: src-tauri
key: aarch64-apple-darwin
- name: Install frontend dependencies
run: npm ci
- name: Build Tauri app
uses: tauri-apps/tauri-action@v0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Code signing — set these as repo secrets.
# APPLE_CERTIFICATE / APPLE_CERTIFICATE_PASSWORD are the base64-encoded
# .p12 export of the Developer ID Application certificate and its password.
APPLE_SIGNING_IDENTITY: ${{ secrets.APPLE_SIGNING_IDENTITY }}
APPLE_CERTIFICATE: ${{ secrets.APPLE_CERTIFICATE }}
APPLE_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }}
# Notarization (optional but strongly recommended for public distribution).
APPLE_ID: ${{ secrets.APPLE_ID }}
APPLE_PASSWORD: ${{ secrets.APPLE_PASSWORD }}
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
with:
args: --target aarch64-apple-darwin
- name: Upload bundle artifact
uses: actions/upload-artifact@v4
with:
name: macos-arm64
path: |
src-tauri/target/aarch64-apple-darwin/release/bundle/dmg/*.dmg
src-tauri/target/aarch64-apple-darwin/release/bundle/macos/*.app.tar.gz
release:
needs: build
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Download bundle artifact
uses: actions/download-artifact@v4
with:
name: macos-arm64
path: artifacts
- name: Create or update GitHub release
uses: softprops/action-gh-release@v2
with:
tag_name: v${{ needs.build.outputs.version }}
name: v${{ needs.build.outputs.version }}
target_commitish: ${{ github.sha }}
generate_release_notes: true
fail_on_unmatched_files: true
files: artifacts/**/*