fix: update alpha and release workflows to trigger builds via git tags only

feat: update release workflow to trigger builds via git tags and add publish version script
This commit is contained in:
Tunglies
2025-06-02 22:23:04 +08:00
parent 7763abf6c2
commit f47b4b961b
5 changed files with 94 additions and 6 deletions

View File

@@ -1,7 +1,10 @@
name: Alpha Build
on:
workflow_dispatch:
# 因为 alpha 不再负责频繁构建,且需要相对于 autobuild 更稳定使用环境
# 所以不再使用 workflow_dispatch 触发
# 应当通过 git tag 来触发构建
# workflow_dispatch:
push:
tags:
- "v*.*.*-alpha*"

View File

@@ -1,7 +1,15 @@
name: Release Build
on:
workflow_dispatch:
# ! 为了避免重复发布版本,应当通过独特 git tag 触发。
# ! 不再使用 workflow_dispatch 触发。
# workflow_dispatch:
push:
# ? 应当限制在 main 分支上触发发布。
# branches:
# - main
tags:
- "v*.*.*"
permissions: write-all
env:
CARGO_INCREMENTAL: 0
@@ -13,6 +21,7 @@ concurrency:
jobs:
release:
name: Release Build
strategy:
fail-fast: false
matrix:
@@ -88,6 +97,7 @@ jobs:
args: --target ${{ matrix.target }}
release-for-linux-arm:
name: Release Build for Linux ARM
strategy:
fail-fast: false
matrix:
@@ -209,6 +219,7 @@ jobs:
src-tauri/target/${{ matrix.target }}/release/bundle/rpm/*.rpm
release-for-fixed-webview2:
name: Release Build for Fixed WebView2
strategy:
fail-fast: false
matrix:
@@ -303,6 +314,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
release-update:
name: Release Update
runs-on: ubuntu-latest
needs: [release, release-for-linux-arm]
steps:
@@ -353,6 +365,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
submit-to-winget:
name: Submit to Winget
runs-on: ubuntu-latest
needs: [release-update]
steps: