9cdb04cbb5
- 100元 = 2000积分,无标签,180天有效 - 500元(热销)= 11000积分,180天有效 - 1000元(推荐)= 23000积分,365天有效 - 5000元(超值)= 125000积分,永久有效 - 1积分 = 0.05元
105 lines
3.2 KiB
YAML
105 lines
3.2 KiB
YAML
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: Download sidecar binaries
|
|
run: |
|
|
mkdir -p tauri-app/src-tauri/binaries
|
|
gh release download v0.0.0-sidecar --repo fun0/meijiaka-zy --pattern "sidecar-binaries.tar.gz" --dir /tmp
|
|
tar xzf /tmp/sidecar-binaries.tar.gz -C tauri-app/src-tauri/binaries/
|
|
chmod +x tauri-app/src-tauri/binaries/ffmpeg-* tauri-app/src-tauri/binaries/ffprobe-*
|
|
env:
|
|
GH_TOKEN: ${{ github.token }}
|
|
|
|
- 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: Download sidecar binaries
|
|
shell: pwsh
|
|
run: |
|
|
New-Item -ItemType Directory -Force -Path tauri-app/src-tauri/binaries
|
|
gh release download v0.0.0-sidecar --repo fun0/meijiaka-zy --pattern "sidecar-binaries.tar.gz" --dir $env:TEMP
|
|
tar xzf "$env:TEMP\sidecar-binaries.tar.gz" -C tauri-app/src-tauri/binaries/
|
|
env:
|
|
GH_TOKEN: ${{ github.token }}
|
|
|
|
- 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
|