mirror of
https://gitee.com/HuLaSpark/HuLa.git
synced 2024-11-29 18:28:30 +08:00
53 lines
1.2 KiB
YAML
53 lines
1.2 KiB
YAML
name: Release CI
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- 'v*'
|
|
workflow_dispatch:
|
|
|
|
concurrency:
|
|
group: release-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
publish:
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
platform: [macos-latest, windows-latest]
|
|
|
|
runs-on: ${{ matrix.platform }}
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: pnpm/action-setup@v2
|
|
with:
|
|
version: 8
|
|
run_install: true
|
|
|
|
# 安装 Node.js
|
|
- name: Use Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 20
|
|
cache: 'pnpm'
|
|
|
|
# 安装 Rust
|
|
- name: install Rust stable
|
|
uses: actions-rs/toolchain@v1
|
|
with:
|
|
toolchain: stable
|
|
|
|
- name: Build Vite + Tauri
|
|
run: pnpm build
|
|
|
|
- name: Create release
|
|
uses: tauri-apps/tauri-action@v0
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
with:
|
|
tagName: v__VERSION__ #这个动作会自动将\_\_VERSION\_\_替换为app version
|
|
releaseName: 'v__VERSION__'
|
|
releaseBody: 'See the assets to download and install this version.'
|
|
releaseDraft: true
|
|
prerelease: false |