mirror of
https://github.com/BTMuli/TeyvatGuide.git
synced 2025-12-07 08:42:49 +08:00
59 lines
1.8 KiB
YAML
59 lines
1.8 KiB
YAML
name: Publish Release
|
||
on:
|
||
push:
|
||
tags:
|
||
- v*
|
||
|
||
jobs:
|
||
publish-tauri:
|
||
permissions:
|
||
contents: write
|
||
strategy:
|
||
fail-fast: false
|
||
matrix:
|
||
platform: [windows-latest, macos-latest]
|
||
runs-on: ${{ matrix.platform }}
|
||
|
||
steps:
|
||
- name: Checkout
|
||
uses: actions/checkout@v3
|
||
- name: Add Rust targets(macOS)
|
||
if: matrix.platform == 'macos-latest'
|
||
run: rustup target add aarch64-apple-darwin
|
||
|
||
- 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@v3
|
||
with:
|
||
node-version: 18.16.0
|
||
- name: setup pnpm
|
||
uses: pnpm/action-setup@v2
|
||
with:
|
||
version: 8.11.0
|
||
- name: Install frontend dependencies
|
||
run: pnpm install
|
||
|
||
- name: Build app
|
||
uses: tauri-apps/tauri-action@dev
|
||
env:
|
||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||
# TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
|
||
# TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}
|
||
with:
|
||
tagName: v__VERSION__ # the action automatically replaces \_\_VERSION\_\_ with the app version
|
||
releaseName: v__VERSION__-beta
|
||
releaseBody: |
|
||
> Windows 平台用户建议通过微软应用商店下载,macOS 平台仅在此发布,Linux 平台暂不支持。
|
||
|
||
<a href="https://apps.microsoft.com/store/detail/9NLBNNNBNSJN?launch=true&cid=BTMuli&mode=mini">
|
||
<img src="https://get.microsoft.com/images/zh-cn%20dark.svg" alt="download"/>
|
||
</a>
|
||
releaseDraft: true
|
||
prerelease: false
|