Files
TeyvatGuide/.github/workflows/build.yml
目棃 af3fe7154a 🚀 v0.4.2
2024-01-30 13:54:32 +08:00

71 lines
2.1 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

name: Publish Release
on:
push:
tags:
- v*
jobs:
publish-tauri:
permissions:
contents: write
strategy:
fail-fast: false
matrix:
settings:
- platform: windows-latest
args: "--verbose"
target: "windows"
- platform: macos-latest
args: "--target x86_64-apple-darwin"
target: "macos-intel"
- platform: macos-latest
args: "--target aarch64-apple-darwin"
target: "macos-arm"
runs-on: ${{ matrix.settings.platform }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Add Rust targets(macOS)
if: matrix.settings.target == 'macos-arm'
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.14.1
- name: remove lockfile
run: rm pnpm-lock.yaml
- name: Install frontend dependencies
run: pnpm install
- name: Build app
uses: tauri-apps/tauri-action@dev
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
args: ${{ matrix.settings.args }}
tagName: v__VERSION__ # the action automatically replaces \_\_VERSION\_\_ with the app version
releaseName: v__VERSION__-beta
releaseBody: |
> [!TIP]
> Windows 平台用户建议通过微软应用商店下载macOS 平台仅在此发布Linux 平台暂不支持。
> 如有使用问题可加入 [反馈QQ群](https://h5.qun.qq.com/s/3cgX0hJ4GA)
<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