Skip to content

准备 v0.7.0

准备 v0.7.0 #18

Workflow file for this run

name: Publish Release
on:
push:
tags:
- v*
jobs:
publish-tauri:
permissions:
contents: write
strategy:
fail-fast: false
matrix:
settings:
- platform: windows-latest
args: "--target x86_64-pc-windows-msvc"
target: "windows"
- platform: windows-latest
args: "--target aarch64-pc-windows-msvc"
target: "windows-aarch64"
runs-on: ${{ matrix.settings.platform }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Add Rust targets window aarch64
if: matrix.settings.target == 'windows-aarch64'
run: rustup target add aarch64-pc-windows-msvc
- name: Get latest release
id: get_release
uses: actions/github-script@v4
with:
script: |
const latestRelease = await github.repos.getLatestRelease({
owner: context.repo.owner,
repo: context.repo.repo,
});
const notes = latestRelease.data.body || '没有更新信息';
return notes;
- name: Rust setup
uses: dtolnay/rust-toolchain@stable
- name: Rust cache
uses: swatinem/rust-cache@v2
with:
workspaces: "./src-tauri -> target"
- name: setup node
uses: actions/setup-node@v4
with:
node-version: lts/*
- name: setup pnpm
uses: pnpm/action-setup@v2
with:
version: 9.12.3
- name: Install frontend dependencies
run: pnpm install
- name: Build app
uses: tauri-apps/tauri-action@v0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }}
TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }}
with:
args: ${{ matrix.settings.args }}
tagName: v__VERSION__ # the action automatically replaces \_\_VERSION\_\_ with the app version
releaseName: 'v__VERSION__'
releaseBody: "${{ steps.get_release.outputs.result }}"
releaseDraft: true
prerelease: false