chore: add GitHub Actions release workflow, signing docs, ignore sidecar binaries
This commit is contained in:
@@ -0,0 +1,86 @@
|
||||
name: Release
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- 'v*'
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
version:
|
||||
description: '版本号 (例如 1.5.16)'
|
||||
required: true
|
||||
type: string
|
||||
|
||||
jobs:
|
||||
build-macos:
|
||||
name: Build macOS (Universal)
|
||||
runs-on: macos-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 22
|
||||
|
||||
- name: Setup Rust
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
with:
|
||||
targets: x86_64-apple-darwin,aarch64-apple-darwin
|
||||
|
||||
- name: Install dependencies
|
||||
working-directory: tauri-app
|
||||
run: npm ci
|
||||
|
||||
- name: Build macOS Universal
|
||||
working-directory: tauri-app
|
||||
run: npm run tauri -- build --target universal-apple-darwin
|
||||
env:
|
||||
TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }}
|
||||
TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }}
|
||||
|
||||
- name: Upload artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: macos-universal
|
||||
path: |
|
||||
tauri-app/src-tauri/target/universal-apple-darwin/release/bundle/dmg/*.dmg
|
||||
tauri-app/src-tauri/target/universal-apple-darwin/release/bundle/macos/*.app
|
||||
|
||||
build-windows:
|
||||
name: Build Windows (x64)
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 22
|
||||
|
||||
- name: Setup Rust
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
with:
|
||||
targets: x86_64-pc-windows-msvc
|
||||
|
||||
- name: Install dependencies
|
||||
working-directory: tauri-app
|
||||
run: npm ci
|
||||
|
||||
- name: Build Windows x64
|
||||
working-directory: tauri-app
|
||||
shell: pwsh
|
||||
run: npm run tauri -- build --target x86_64-pc-windows-msvc
|
||||
env:
|
||||
TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }}
|
||||
TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }}
|
||||
|
||||
- name: Upload artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: windows-x64
|
||||
path: |
|
||||
tauri-app/src-tauri/target/x86_64-pc-windows-msvc/release/bundle/nsis/*.exe
|
||||
tauri-app/src-tauri/target/x86_64-pc-windows-msvc/release/bundle/msi/*.msi
|
||||
Reference in New Issue
Block a user