Build and release #37
Workflow file for this run
This file contains 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
name: Build and release | |
on: | |
push: | |
tags: | |
- 'v*' | |
workflow_dispatch: | |
jobs: | |
release: | |
permissions: | |
contents: write | |
strategy: | |
fail-fast: false | |
matrix: | |
platform: [macos-latest, windows-latest] | |
runs-on: ${{ matrix.platform }} | |
steps: | |
# 检出存储库 | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
# 设置 rust 环境 | |
- name: Rust setup | |
uses: dtolnay/rust-toolchain@stable | |
# rust 缓存 | |
- name: Rust cache | |
uses: swatinem/rust-cache@v2 | |
with: | |
workspaces: './src-tauri -> target' | |
# 设置 node 环境 | |
- name: Sync node version and setup cache | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 'lts/*' | |
cache: 'pnpm' # Set this to npm, yarn or pnpm. | |
- name: Install frontend dependencies | |
run: pnpm install # Change this to npm, yarn or pnpm. | |
- name: Build the app | |
uses: tauri-apps/tauri-action@v0 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tagName: ${{ github.ref_name }} # This only works if your workflow triggers on new tags. | |
releaseName: 'App Name v__VERSION__' # tauri-action replaces \_\_VERSION\_\_ with the app version. | |
releaseBody: 'See the assets to download and install this version.' | |
releaseDraft: false | |
prerelease: false |