mirror of
https://github.com/clash-verge-rev/clash-verge-rev
synced 2025-05-05 03:13:44 +08:00
chore: update version to 2.2.1-alpha and add alpha update logs
refactor: simplify version change detection in alpha workflow chore: alpha delete old release then release new one fix: update alpha workflow to handle missing ALPHA_LOGS and improve release notes generation fix: update job dependencies in alpha workflow to include delete_otld_release
This commit is contained in:
parent
d6dd89b674
commit
167edcf8ef
92
.github/workflows/alpha.yml
vendored
92
.github/workflows/alpha.yml
vendored
@ -25,7 +25,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
fetch-depth: 2
|
fetch-depth: 2
|
||||||
|
|
||||||
- name: Check if commit changed
|
- name: Check if version changed
|
||||||
id: check
|
id: check
|
||||||
run: |
|
run: |
|
||||||
# For manual workflow_dispatch, always run
|
# For manual workflow_dispatch, always run
|
||||||
@ -34,21 +34,44 @@ jobs:
|
|||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Check if current commit is different from the previous one
|
# Store current version from package.json
|
||||||
CURRENT_COMMIT=$(git rev-parse HEAD)
|
CURRENT_VERSION=$(cat package.json | jq -r '.version')
|
||||||
PREVIOUS_COMMIT=$(git rev-parse HEAD~1)
|
echo "Current version: $CURRENT_VERSION"
|
||||||
|
|
||||||
if [ "$CURRENT_COMMIT" != "$PREVIOUS_COMMIT" ]; then
|
# Get the previous commit's package.json version
|
||||||
echo "New commit detected: $CURRENT_COMMIT"
|
git checkout HEAD~1 package.json
|
||||||
|
PREVIOUS_VERSION=$(cat package.json | jq -r '.version')
|
||||||
|
echo "Previous version: $PREVIOUS_VERSION"
|
||||||
|
|
||||||
|
# Reset back to current commit
|
||||||
|
git checkout HEAD package.json
|
||||||
|
|
||||||
|
# Check if version changed
|
||||||
|
if [ "$CURRENT_VERSION" != "$PREVIOUS_VERSION" ]; then
|
||||||
|
echo "Version changed from $PREVIOUS_VERSION to $CURRENT_VERSION"
|
||||||
echo "should_run=true" >> $GITHUB_OUTPUT
|
echo "should_run=true" >> $GITHUB_OUTPUT
|
||||||
else
|
else
|
||||||
echo "No new commits since last run"
|
echo "Version unchanged: $CURRENT_VERSION"
|
||||||
echo "should_run=false" >> $GITHUB_OUTPUT
|
echo "should_run=false" >> $GITHUB_OUTPUT
|
||||||
fi
|
fi
|
||||||
|
|
||||||
alpha:
|
delete_old_release:
|
||||||
needs: check_commit
|
needs: check_commit
|
||||||
if: ${{ needs.check_commit.outputs.should_run == 'true' }}
|
if: ${{ needs.check_commit.outputs.should_run == 'true' }}
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Delete Old Alpha Release
|
||||||
|
uses: dev-drprasad/delete-tag-and-release@v1.1
|
||||||
|
with:
|
||||||
|
tag_name: alpha
|
||||||
|
delete_release: true
|
||||||
|
repo: ${{ github.repository }}
|
||||||
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
alpha:
|
||||||
|
needs: delete_old_release
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
@ -103,9 +126,6 @@ jobs:
|
|||||||
pnpm i
|
pnpm i
|
||||||
pnpm check ${{ matrix.target }}
|
pnpm check ${{ matrix.target }}
|
||||||
|
|
||||||
- name: Alpha Version update
|
|
||||||
run: pnpm run fix-alpha-version
|
|
||||||
|
|
||||||
- name: Tauri build
|
- name: Tauri build
|
||||||
uses: tauri-apps/tauri-action@v0
|
uses: tauri-apps/tauri-action@v0
|
||||||
env:
|
env:
|
||||||
@ -129,8 +149,7 @@ jobs:
|
|||||||
args: --target ${{ matrix.target }}
|
args: --target ${{ matrix.target }}
|
||||||
|
|
||||||
alpha-for-linux-arm:
|
alpha-for-linux-arm:
|
||||||
needs: check_commit
|
needs: delete_old_release
|
||||||
if: ${{ needs.check_commit.outputs.should_run == 'true' }}
|
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
@ -252,8 +271,7 @@ jobs:
|
|||||||
src-tauri/target/${{ matrix.target }}/release/bundle/rpm/*.rpm
|
src-tauri/target/${{ matrix.target }}/release/bundle/rpm/*.rpm
|
||||||
|
|
||||||
alpha-for-fixed-webview2:
|
alpha-for-fixed-webview2:
|
||||||
needs: check_commit
|
needs: delete_old_release
|
||||||
if: ${{ needs.check_commit.outputs.should_run == 'true' }}
|
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
@ -351,26 +369,50 @@ jobs:
|
|||||||
update_tag:
|
update_tag:
|
||||||
name: Update tag
|
name: Update tag
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: [check_commit, alpha, alpha-for-linux-arm, alpha-for-fixed-webview2]
|
needs: [delete_old_release, alpha, alpha-for-linux-arm, alpha-for-fixed-webview2]
|
||||||
if: ${{ needs.check_commit.outputs.should_run == 'true' }}
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Fetch Alpha update logs
|
||||||
|
id: fetch_alpha_logs
|
||||||
|
run: |
|
||||||
|
# Check if UPDATELOG.md exists
|
||||||
|
if [ -f "UPDATELOG.md" ]; then
|
||||||
|
# Extract the section starting with ## and containing -alpha until the next ## or end of file
|
||||||
|
ALPHA_LOGS=$(awk '/^## .*-alpha/{flag=1; print; next} /^## /{flag=0} flag' UPDATELOG.md)
|
||||||
|
|
||||||
|
if [ -n "$ALPHA_LOGS" ]; then
|
||||||
|
echo "Found alpha update logs"
|
||||||
|
echo "ALPHA_LOGS<<EOF" >> $GITHUB_ENV
|
||||||
|
echo "$ALPHA_LOGS" >> $GITHUB_ENV
|
||||||
|
echo "EOF" >> $GITHUB_ENV
|
||||||
|
else
|
||||||
|
echo "No alpha sections found in UPDATELOG.md"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
echo "UPDATELOG.md file not found"
|
||||||
|
fi
|
||||||
|
shell: bash
|
||||||
|
|
||||||
- name: Set Env
|
- name: Set Env
|
||||||
run: |
|
run: |
|
||||||
echo "BUILDTIME=$(TZ=Asia/Shanghai date)" >> $GITHUB_ENV
|
echo "BUILDTIME=$(TZ=Asia/Shanghai date)" >> $GITHUB_ENV
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
# - name: Update Tag
|
|
||||||
# uses: richardsimko/update-tag@v1
|
|
||||||
# with:
|
|
||||||
# tag_name: alpha
|
|
||||||
# env:
|
|
||||||
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
|
|
||||||
- run: |
|
- run: |
|
||||||
cat > release.txt << 'EOF'
|
# 检查 ALPHA_LOGS 是否存在,如果不存在则使用默认消息
|
||||||
|
if [ -z "$ALPHA_LOGS" ]; then
|
||||||
|
echo "No alpha logs found, using default message"
|
||||||
|
ALPHA_LOGS="More new features are now supported. Check for detailed changelog soon."
|
||||||
|
else
|
||||||
|
echo "Using found alpha logs"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# 生成 release.txt 文件
|
||||||
|
cat > release.txt << EOF
|
||||||
|
$ALPHA_LOGS
|
||||||
|
|
||||||
## 我应该下载哪个版本?
|
## 我应该下载哪个版本?
|
||||||
|
|
||||||
### MacOS
|
### MacOS
|
||||||
|
@ -1,3 +1,11 @@
|
|||||||
|
## v2.2.1-alpha
|
||||||
|
**发行代号:拓**
|
||||||
|
|
||||||
|
#### 修复
|
||||||
|
1. **系统**
|
||||||
|
- 修复 MacOS 无法使用快捷键粘贴/选择/复制订阅地址。
|
||||||
|
|
||||||
|
|
||||||
## v2.2.0
|
## v2.2.0
|
||||||
|
|
||||||
**发行代号:拓**
|
**发行代号:拓**
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "clash-verge",
|
"name": "clash-verge",
|
||||||
"version": "2.2.0",
|
"version": "2.2.1-alpha",
|
||||||
"license": "GPL-3.0-only",
|
"license": "GPL-3.0-only",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "cross-env RUST_BACKTRACE=1 tauri dev -f verge-dev -- --profile fast-dev",
|
"dev": "cross-env RUST_BACKTRACE=1 tauri dev -f verge-dev -- --profile fast-dev",
|
||||||
|
2
src-tauri/Cargo.lock
generated
2
src-tauri/Cargo.lock
generated
@ -1132,7 +1132,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "clash-verge"
|
name = "clash-verge"
|
||||||
version = "2.1.2"
|
version = "2.2.1-alpha"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"ab_glyph",
|
"ab_glyph",
|
||||||
"aes-gcm",
|
"aes-gcm",
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "clash-verge"
|
name = "clash-verge"
|
||||||
version = "2.1.2"
|
version = "2.2.1-alpha"
|
||||||
description = "clash verge"
|
description = "clash verge"
|
||||||
authors = ["zzzgydi", "wonfen", "MystiPanda"]
|
authors = ["zzzgydi", "wonfen", "MystiPanda"]
|
||||||
license = "GPL-3.0-only"
|
license = "GPL-3.0-only"
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"version": "2.2.0",
|
"version": "2.2.1-alpha",
|
||||||
"$schema": "../node_modules/@tauri-apps/cli/config.schema.json",
|
"$schema": "../node_modules/@tauri-apps/cli/config.schema.json",
|
||||||
"bundle": {
|
"bundle": {
|
||||||
"active": true,
|
"active": true,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user