-
Notifications
You must be signed in to change notification settings - Fork 0
81 lines (70 loc) · 2.71 KB
/
Copy pathrelease.yml
File metadata and controls
81 lines (70 loc) · 2.71 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
name: Release
# 打 tag(v*)或手动触发即出安装包:macOS(arm64/x64) DMG + Windows(x64) NSIS。
# releaseDraft: true 保持「人工确认后发布」门禁:tauri-action 创建草稿 Release,
# 合并各平台产物与签名数据,并自动生成 latest.json(Windows 应用内自动更新端点)。
on:
push:
tags:
- "v*"
workflow_dispatch:
permissions:
contents: write
env:
CARGO_TERM_COLOR: always
jobs:
build:
name: bundle (${{ matrix.label }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: macos-15 # Apple Silicon (arm64)
label: macos-arm64
artifact: talksee-macos-arm64
- os: macos-15-intel # Intel (x86_64)
label: macos-x64
artifact: talksee-macos-x64
- os: windows-latest
label: windows-x64
artifact: talksee-windows-x64
steps:
- uses: actions/checkout@v4
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
run_install: false
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 22
cache: pnpm
- name: Install frontend dependencies
run: pnpm install --frozen-lockfile
- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
- name: Cache Rust dependencies
uses: Swatinem/rust-cache@v2
- name: Run Rust tests
run: cargo test --workspace
# tauri-action 读取 tauri.conf.json 的 beforeBuildCommand(`pnpm build &&
# pnpm package:runtime`)与 createUpdaterArtifacts(生成签名后的
# latest.json + .sig);TALKSEE_STANDALONE=1 让 package:runtime 下载
# 自包含 Python 打进资源,产物换机器可跑。target 由 runner 自动探测
# (macos-15 → aarch64-apple-darwin,macos-15-intel → x86_64-apple-darwin,
# windows-latest → x86_64-pc-windows-msvc)。
# draft=true 门禁:tauri-action 按 tagName 创建/复用草稿 Release 并合并
# 各平台产物,人工确认后发布;发布后 latest.json 即可供应用内自动更新。
- name: Build and publish
uses: tauri-apps/tauri-action@v0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }}
TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }}
TALKSEE_STANDALONE: "1"
with:
tagName: v__VERSION__
releaseName: 'TalkSee v__VERSION__'
releaseBody: 'See the assets to download this version and install.'
releaseDraft: true
prerelease: false