Skip to content

Add in-app auto-update and ship 0.1.2. #3

Add in-app auto-update and ship 0.1.2.

Add in-app auto-update and ship 0.1.2. #3

Workflow file for this run

name: Release
on:
push:
tags:
- "v*"
permissions:
contents: write
jobs:
verify:
name: Verify release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: actions/setup-node@v7
with:
node-version: 24
cache: npm
- name: Verify tag matches package version
shell: bash
run: |
version="$(node -p "require('./package.json').version")"
test "v${version}" = "${GITHUB_REF_NAME}"
- name: Install dependencies
run: npm ci
- name: Run checks
run: npm run check
release:
name: ${{ matrix.name }}
needs: verify
permissions:
contents: write
strategy:
fail-fast: false
matrix:
include:
- name: Windows x64
platform: windows-latest
rustTarget: ""
args: "--bundles msi,nsis"
- name: macOS Apple Silicon
platform: macos-latest
rustTarget: aarch64-apple-darwin
args: "--target aarch64-apple-darwin --bundles dmg"
- name: macOS Intel
platform: macos-latest
rustTarget: x86_64-apple-darwin
args: "--target x86_64-apple-darwin --bundles dmg"
runs-on: ${{ matrix.platform }}
timeout-minutes: 60
steps:
- uses: actions/checkout@v7
- uses: actions/setup-node@v7
with:
node-version: 24
cache: npm
- uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.rustTarget }}
- uses: Swatinem/rust-cache@v2
with:
workspaces: src-tauri
- name: Install dependencies
run: npm ci
- name: Configure ad-hoc macOS signing
if: runner.os == 'macOS'
shell: bash
run: echo "APPLE_SIGNING_IDENTITY=-" >> "$GITHUB_ENV"
- name: Build and publish installers
uses: tauri-apps/tauri-action@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Required for signed updater artifacts (must match pubkey in tauri.conf.json).
TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }}
TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }}
with:
tagName: ${{ github.ref_name }}
releaseName: "MarsBuild ${{ github.ref_name }}"
releaseBody: "Download the installer for your platform below. In-app updates use latest.json + signed bundles."
releaseDraft: false
prerelease: false
# Publishes latest.json for tauri-plugin-updater endpoints.
uploadUpdaterJson: true
args: ${{ matrix.args }}
releaseAssetNamePattern: "[name]_[version]_[platform]_[arch]_[bundle][ext]"