Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
67934dc
chore(ci): 拆分 dev/preview/master 流程
YueerMoe Feb 6, 2026
2e2d945
chore(version): 升级版本号至 0.2.0
YueerMoe Feb 6, 2026
df2889e
chore: 更新 gitignore
YueerMoe Feb 6, 2026
fe266d7
feat(updater): 支持预发布更新并优化版本比较
YueerMoe Feb 6, 2026
8affa99
chore(node): 统一至 Node 24.x
YueerMoe Feb 6, 2026
2b42cfd
Merge pull request #1 from BoxCatTeam/dev
YueerMoe Feb 6, 2026
1c99a05
chore(scripts): 跟踪版本同步脚本
YueerMoe Feb 6, 2026
45f9151
Merge pull request #2 from BoxCatTeam/dev
YueerMoe Feb 6, 2026
2f4adf8
chore(version): 更新版本号为 0.2.0-pre.698644be.45f9151
github-actions[bot] Feb 6, 2026
43be2f1
fix(ci): 修正 tauri-action 引用版本
YueerMoe Feb 6, 2026
b99c5f1
Merge pull request #3 from BoxCatTeam/dev
YueerMoe Feb 6, 2026
6b6cc3a
chore(version): 更新版本号为 0.2.0-pre.69864845.b99c5f1
github-actions[bot] Feb 6, 2026
a69ad69
chore(ci): 增加macOS构建并输出便携版exe
YueerMoe Feb 6, 2026
4bed45b
Merge pull request #4 from BoxCatTeam/dev
YueerMoe Feb 6, 2026
28efb03
chore(version): 更新版本号为 0.2.0-pre.698655d1.4bed45b
github-actions[bot] Feb 6, 2026
49cabd1
fix(metadata): 默认使用 latest 获取元数据
YueerMoe Feb 7, 2026
683f33a
ci(release): 添加多平台 ARM 构建矩阵
YueerMoe Feb 7, 2026
087703a
Merge pull request #5 from BoxCatTeam/dev
YueerMoe Feb 8, 2026
8215fe3
chore(version): 更新版本号为 0.2.0-pre.6988755b.087703a
github-actions[bot] Feb 8, 2026
00a95bd
refactor(release): 提取 release 解析并改进版本同步
YueerMoe Feb 8, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 55 additions & 0 deletions .github/workflows/dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Dev CI

on:
push:
branches:
- dev
workflow_dispatch:

concurrency:
group: dev-ci-${{ github.ref }}
cancel-in-progress: true

jobs:
build:
runs-on: ${{ matrix.platform }}
strategy:
fail-fast: false
matrix:
platform: [windows-latest, macos-latest, ubuntu-22.04]

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 24
cache: yarn
cache-dependency-path: yarn.lock

- name: Setup Rust
uses: dtolnay/rust-toolchain@stable

- name: Cache Rust
uses: swatinem/rust-cache@v2
with:
workspaces: |
src-tauri -> src-tauri/target

- name: Install Linux dependencies
if: matrix.platform == 'ubuntu-22.04'
run: |
sudo apt-get update
sudo apt-get install -y libwebkit2gtk-4.1-dev libayatana-appindicator3-dev librsvg2-dev patchelf

- name: Install dependencies
run: yarn install --frozen-lockfile

- name: Build
run: yarn build

- name: Rust tests
run: cargo test --manifest-path src-tauri/Cargo.toml

149 changes: 149 additions & 0 deletions .github/workflows/preview.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,149 @@
name: Preview Prerelease

on:
pull_request:
types: [closed]
branches:
- preview
workflow_dispatch:

permissions:
contents: write

concurrency:
group: preview-prerelease
cancel-in-progress: false

jobs:
prepare:
if: github.event_name == 'workflow_dispatch' || (github.event.pull_request.merged == true && github.event.pull_request.base.ref == 'preview' && github.event.pull_request.head.ref == 'dev')
runs-on: ubuntu-latest
outputs:
tag_name: ${{ steps.vars.outputs.tag_name }}
app_version: ${{ steps.vars.outputs.app_version }}

steps:
- name: Checkout (preview)
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: preview

- name: Configure git
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"

- name: Bump version, commit and tag
id: vars
shell: pwsh
run: |
$pkg = Get-Content -Raw package.json | ConvertFrom-Json
$baseVersion = [string]$pkg.version
if ($baseVersion.Contains("-")) { $baseVersion = $baseVersion.Split("-", 2)[0] }

$shortSha = (git rev-parse --short=7 HEAD).Trim()
$epoch = [int64](Get-Date -AsUTC -UFormat %s)
$hex = ("{0:x}" -f $epoch)
$preVersion = "$baseVersion-pre.$hex.$shortSha"
$tag = "v$preVersion"

if ((git ls-remote --tags origin "refs/tags/$tag")) {
throw "Tag already exists on origin: $tag"
}

./scripts/set-version.ps1 -Version $preVersion
git add package.json src-tauri/tauri.conf.json src-tauri/Cargo.toml
git commit -m "chore(version): 更新版本号为 $preVersion"
git tag $tag

git push origin preview
git push origin $tag

"tag_name=$tag" >> $env:GITHUB_OUTPUT
"app_version=$preVersion" >> $env:GITHUB_OUTPUT

build:
needs: prepare
runs-on: ${{ matrix.platform }}
strategy:
fail-fast: false
matrix:
platform: [windows-latest, macos-latest, ubuntu-22.04]

steps:
- name: Checkout (tag)
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ needs.prepare.outputs.tag_name }}

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 24
cache: yarn
cache-dependency-path: yarn.lock

- name: Setup Rust
uses: dtolnay/rust-toolchain@stable

- name: Cache Rust
uses: swatinem/rust-cache@v2
with:
workspaces: |
src-tauri -> src-tauri/target

- name: Install Linux dependencies
if: matrix.platform == 'ubuntu-22.04'
run: |
sudo apt-get update
sudo apt-get install -y libwebkit2gtk-4.1-dev libayatana-appindicator3-dev librsvg2-dev patchelf rpm

- name: Install frontend dependencies
run: yarn install --frozen-lockfile

- name: Quick web build
run: yarn build

- name: Rust tests
run: cargo test --manifest-path src-tauri/Cargo.toml

- name: Build Tauri app and publish prerelease assets
uses: tauri-apps/tauri-action@v0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
projectPath: .
releaseDraft: false
prerelease: true
releaseNotes: true
tagName: ${{ needs.prepare.outputs.tag_name }}
releaseName: EndCat ${{ needs.prepare.outputs.tag_name }}

- name: Create portable exe (Windows)
if: matrix.platform == 'windows-latest'
shell: pwsh
run: |
$version = "${{ needs.prepare.outputs.app_version }}"
$exe = "src-tauri/target/release/endfield-cat.exe"
if (-not (Test-Path -LiteralPath $exe)) {
throw "Missing binary: $exe"
}

$outDir = "src-tauri/target/release/bundle/portable"
New-Item -ItemType Directory -Force -Path $outDir | Out-Null
$portableExe = Join-Path $outDir ("endfield-cat_{0}_x64_portable.exe" -f $version)
Copy-Item -LiteralPath $exe -Destination $portableExe -Force

"PORTABLE_EXE=$portableExe" >> $env:GITHUB_ENV

- name: Upload portable exe to release (Windows)
if: matrix.platform == 'windows-latest'
shell: pwsh
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
$tag = "${{ needs.prepare.outputs.tag_name }}"
if (-not $env:PORTABLE_EXE) { throw "PORTABLE_EXE env is not set" }
gh release upload $tag "$env:PORTABLE_EXE" --clobber --repo "$env:GITHUB_REPOSITORY"
164 changes: 164 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,164 @@
name: Release Draft

on:
pull_request:
types: [closed]
branches:
- master
workflow_dispatch:

permissions:
contents: write

concurrency:
group: master-release
cancel-in-progress: false

jobs:
prepare:
if: github.event_name == 'workflow_dispatch' || (github.event.pull_request.merged == true && github.event.pull_request.base.ref == 'master' && github.event.pull_request.head.ref == 'preview')
runs-on: ubuntu-latest
outputs:
tag_name: ${{ steps.vars.outputs.tag_name }}
app_version: ${{ steps.vars.outputs.app_version }}

steps:
- name: Checkout (master)
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: master

- name: Configure git
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"

- name: Bump version, commit and tag
id: vars
shell: pwsh
run: |
$pkg = Get-Content -Raw package.json | ConvertFrom-Json
$current = [string]$pkg.version
$releaseVersion = $current
if ($releaseVersion.Contains("-")) { $releaseVersion = $releaseVersion.Split("-", 2)[0] }

$tag = "v$releaseVersion"
if ((git ls-remote --tags origin "refs/tags/$tag")) {
throw "Tag already exists on origin: $tag"
}

./scripts/set-version.ps1 -Version $releaseVersion
git add package.json src-tauri/tauri.conf.json src-tauri/Cargo.toml
git commit -m "chore(version): 更新版本号为 $releaseVersion"
git tag $tag

git push origin master
git push origin $tag

"tag_name=$tag" >> $env:GITHUB_OUTPUT
"app_version=$releaseVersion" >> $env:GITHUB_OUTPUT

build:
needs: prepare
runs-on: ${{ matrix.os }}
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-13
target: x86_64-apple-darwin
- os: macos-14
target: aarch64-apple-darwin
- os: ubuntu-22.04
target: x86_64-unknown-linux-gnu
- os: ubuntu-22.04-arm64
target: aarch64-unknown-linux-gnu

steps:
- name: Checkout (tag)
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ needs.prepare.outputs.tag_name }}

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 24
cache: yarn
cache-dependency-path: yarn.lock

- name: Setup Rust
uses: dtolnay/rust-toolchain@stable

- name: Add Rust target
run: rustup target add ${{ matrix.target }}

- name: Cache Rust
uses: swatinem/rust-cache@v2
with:
workspaces: |
src-tauri -> src-tauri/target

- name: Install Linux dependencies
if: startsWith(matrix.os, 'ubuntu-22.04')
run: |
sudo apt-get update
sudo apt-get install -y libwebkit2gtk-4.1-dev libayatana-appindicator3-dev librsvg2-dev patchelf rpm

- name: Install frontend dependencies
run: yarn install --frozen-lockfile

- name: Quick web build
run: yarn build

- name: Rust tests
run: cargo test --manifest-path src-tauri/Cargo.toml

- name: Build Tauri app and create draft release
uses: tauri-apps/tauri-action@v0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
projectPath: .
releaseDraft: true
prerelease: false
releaseNotes: true
tagName: ${{ needs.prepare.outputs.tag_name }}
releaseName: EndCat ${{ needs.prepare.outputs.tag_name }}
target: ${{ matrix.target }}

- name: Create portable exe (Windows)
if: matrix.os == 'windows-latest'
shell: pwsh
run: |
$version = "${{ needs.prepare.outputs.app_version }}"
$candidates = @(
"src-tauri/target/${{ matrix.target }}/release/endfield-cat.exe",
"src-tauri/target/release/endfield-cat.exe"
)
$exe = $candidates | Where-Object { Test-Path -LiteralPath $_ } | Select-Object -First 1
if (-not $exe) { throw "Missing binary for target ${{ matrix.target }}" }

$outDir = "src-tauri/target/release/bundle/portable"
New-Item -ItemType Directory -Force -Path $outDir | Out-Null
$suffix = if ("${{ matrix.target }}" -like "aarch64*") { "arm64" } else { "x64" }
$portableExe = Join-Path $outDir ("endfield-cat_{0}_{1}_portable.exe" -f $version, $suffix)
Copy-Item -LiteralPath $exe -Destination $portableExe -Force

"PORTABLE_EXE=$portableExe" >> $env:GITHUB_ENV

- name: Upload portable exe to release (Windows)
if: matrix.os == 'windows-latest'
shell: pwsh
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
$tag = "${{ needs.prepare.outputs.tag_name }}"
if (-not $env:PORTABLE_EXE) { throw "PORTABLE_EXE env is not set" }
gh release upload $tag "$env:PORTABLE_EXE" --clobber --repo "$env:GITHUB_REPOSITORY"
Loading
Loading