fix(build): 🐛 修复release配置导致打包的问题

This commit is contained in:
nongyehong
2024-10-29 14:17:11 +08:00
parent 19fb138d51
commit 4cd9a9355d

View File

@@ -11,21 +11,21 @@ concurrency:
cancel-in-progress: true
jobs:
publish:
publish-tauri:
permissions:
contents: write
strategy:
fail-fast: false
matrix:
include:
- os: windows-latest
target: x86_64-pc-windows-msvc
- os: windows-latest
target: aarch64-pc-windows-msvc
- os: macos-latest
target: aarch64-apple-darwin
- os: macos-latest
target: x86_64-apple-darwin
- platform: 'macos-latest' # for Arm based macs (M1 and above).
args: '--target aarch64-apple-darwin'
- platform: 'macos-latest' # for Intel based macs.
args: '--target x86_64-apple-darwin'
- platform: 'windows-latest'
args: ''
runs-on: ${{ matrix.os }}
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v4
@@ -39,18 +39,24 @@ jobs:
- name: Install pnpm
run: npm install -g pnpm@9.2.0
# 安装 Rust
- name: install Rust stable
uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: Install dependencies
run: pnpm install
- name: Build Vite + Tauri
run: pnpm build
# 安装 Rust
- name: install Rust stable
uses: dtolnay/rust-toolchain@stable # Set this to dtolnay/rust-toolchain@nightly
with:
# Those targets are only used on macos runners so it's in an `if` to slightly speed up windows and linux builds.
targets: ${{ matrix.platform == 'macos-latest' && 'aarch64-apple-darwin,x86_64-apple-darwin' || '' }}
- name: Rust cache
uses: swatinem/rust-cache@v2
with:
workspaces: './src-tauri -> target'
- name: Create release
uses: tauri-apps/tauri-action@v0
env:
@@ -65,3 +71,4 @@ jobs:
releaseBody: 'See the assets to download and install this version.'
releaseDraft: true
prerelease: false
args: ${{ matrix.args }}