mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-01-29 08:45:41 +08:00
chore(workflow): add release info & telegram notification
This commit is contained in:
75
.github/workflows/autobuild.yml
vendored
75
.github/workflows/autobuild.yml
vendored
@@ -53,6 +53,9 @@ jobs:
|
||||
- name: Set Env
|
||||
run: |
|
||||
echo "BUILDTIME=$(TZ=Asia/Shanghai date)" >> $GITHUB_ENV
|
||||
VERSION=$(jq -r .version package.json)
|
||||
echo "VERSION=$VERSION" >> $GITHUB_ENV
|
||||
echo "DOWNLOAD_URL=https://github.com/clash-verge-rev/clash-verge-rev/releases/download/autobuild" >> $GITHUB_ENV
|
||||
shell: bash
|
||||
|
||||
- run: |
|
||||
@@ -66,25 +69,31 @@ jobs:
|
||||
cat > release.txt << EOF
|
||||
$UPDATE_LOGS
|
||||
|
||||
## 我应该下载哪个版本?
|
||||
|
||||
### MacOS
|
||||
- MacOS intel芯片: x64.dmg
|
||||
- MacOS apple M芯片: aarch64.dmg
|
||||
|
||||
### Linux
|
||||
- Linux 64位: amd64.deb/amd64.rpm
|
||||
- Linux arm64 architecture: arm64.deb/aarch64.rpm
|
||||
- Linux armv7架构: armhf.deb/armhfp.rpm
|
||||
## 下载地址
|
||||
|
||||
### Windows (不再支持Win7)
|
||||
#### 正常版本(推荐)
|
||||
- 64位: x64-setup.exe
|
||||
- arm64架构: arm64-setup.exe
|
||||
#### 便携版问题很多不再提供
|
||||
- 64位(常用): [clash-verge_${{ env.VERSION }}_x64-setup.exe](${{ env.DOWNLOAD_URL }}/clash-verge_${{ env.VERSION }}_x64-setup.exe)
|
||||
- ARM64(不常用): [clash-verge_${{ env.VERSION }}_arm64-setup.exe](${{ env.DOWNLOAD_URL }}/clash-verge_${{ env.VERSION }}_arm64-setup.exe)
|
||||
|
||||
#### 内置Webview2版(体积较大,仅在企业版系统或无法安装webview2时使用)
|
||||
- 64位: x64_fixed_webview2-setup.exe
|
||||
- arm64架构: arm64_fixed_webview2-setup.exe
|
||||
- 64位: [clash-verge_${{ env.VERSION }}_x64_fixed_webview2-setup.exe](${{ env.DOWNLOAD_URL }}/clash-verge_${{ env.VERSION }}_x64_fixed_webview2-setup.exe)
|
||||
- ARM64: [clash-verge_${{ env.VERSION }}_arm64_fixed_webview2-setup.exe](${{ env.DOWNLOAD_URL }}/clash-verge_${{ env.VERSION }}_arm64_fixed_webview2-setup.exe)
|
||||
|
||||
### macOS
|
||||
- Apple M芯片: [clash-verge_${{ env.VERSION }}_aarch64.dmg](${{ env.DOWNLOAD_URL }}/clash-verge_${{ env.VERSION }}_aarch64.dmg)
|
||||
- Intel芯片: [clash-verge_${{ env.VERSION }}_x64.dmg](${{ env.DOWNLOAD_URL }}/clash-verge_${{ env.VERSION }}_x64.dmg)
|
||||
|
||||
### Linux
|
||||
#### DEB包(Debian系) 使用 apt ./路径 安装
|
||||
- 64位: [clash-verge_${{ env.VERSION }}_amd64.deb](${{ env.DOWNLOAD_URL }}/clash-verge_${{ env.VERSION }}_amd64.deb)
|
||||
- ARM64: [clash-verge_${{ env.VERSION }}_arm64.deb](${{ env.DOWNLOAD_URL }}/clash-verge_${{ env.VERSION }}_arm64.deb)
|
||||
- ARMv7: [clash-verge_${{ env.VERSION }}_armhf.deb](${{ env.DOWNLOAD_URL }}/clash-verge_${{ env.VERSION }}_armhf.deb)
|
||||
|
||||
#### RPM包(Redhat系) 使用 dnf ./路径 安装
|
||||
- 64位: [clash-verge_${{ env.VERSION }}_amd64.rpm](${{ env.DOWNLOAD_URL }}/clash-verge_${{ env.VERSION }}_amd64.rpm)
|
||||
- ARM64: [clash-verge_${{ env.VERSION }}_aarch64.rpm](${{ env.DOWNLOAD_URL }}/clash-verge_${{ env.VERSION }}_aarch64.rpm)
|
||||
- ARMv7: [clash-verge_${{ env.VERSION }}_armhfp.rpm](${{ env.DOWNLOAD_URL }}/clash-verge_${{ env.VERSION }}_armhfp.rpm)
|
||||
|
||||
### FAQ
|
||||
- [常见问题](https://clash-verge-rev.github.io/faq/windows.html)
|
||||
@@ -437,3 +446,39 @@ jobs:
|
||||
run: pnpm portable-fixed-webview2 ${{ matrix.target }} --${{ env.TAG_NAME }}
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
notify-telegram:
|
||||
name: Notify Telegram
|
||||
runs-on: ubuntu-latest
|
||||
needs: [autobuild-x86-windows-macos-linux, autobuild-arm-linux, autobuild-x86-arm-windows_webview2]
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install Node
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: "22"
|
||||
|
||||
- uses: pnpm/action-setup@v4
|
||||
name: Install pnpm
|
||||
with:
|
||||
run_install: false
|
||||
|
||||
- name: Install dependencies
|
||||
run: pnpm install --frozen-lockfile
|
||||
|
||||
- name: Get Version and Release Info
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install jq
|
||||
echo "VERSION=$(cat package.json | jq '.version' | tr -d '"')" >> $GITHUB_ENV
|
||||
echo "DOWNLOAD_URL=https://github.com/clash-verge-rev/clash-verge-rev/releases/download/autobuild" >> $GITHUB_ENV
|
||||
|
||||
- name: Send Telegram Notification
|
||||
run: node scripts/telegram.mjs
|
||||
env:
|
||||
TELEGRAM_BOT_TOKEN: ${{ secrets.TELEGRAM_BOT_TOKEN }}
|
||||
BUILD_TYPE: autobuild
|
||||
VERSION: ${{ env.VERSION }}
|
||||
DOWNLOAD_URL: ${{ env.DOWNLOAD_URL }}
|
||||
|
||||
137
.github/workflows/release.yml
vendored
137
.github/workflows/release.yml
vendored
@@ -40,9 +40,100 @@ jobs:
|
||||
fi
|
||||
echo "Tag and package.json version are consistent."
|
||||
|
||||
update_tag:
|
||||
name: Update tag
|
||||
runs-on: ubuntu-latest
|
||||
needs: check_tag_version
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Fetch UPDATE logs
|
||||
id: fetch_update_logs
|
||||
run: |
|
||||
if [ -f "UPDATELOG.md" ]; then
|
||||
UPDATE_LOGS=$(awk '/^## v/{if(flag) exit; flag=1} flag' UPDATELOG.md)
|
||||
if [ -n "$UPDATE_LOGS" ]; then
|
||||
echo "Found update logs"
|
||||
echo "UPDATE_LOGS<<EOF" >> $GITHUB_ENV
|
||||
echo "$UPDATE_LOGS" >> $GITHUB_ENV
|
||||
echo "EOF" >> $GITHUB_ENV
|
||||
else
|
||||
echo "No update sections found in UPDATELOG.md"
|
||||
fi
|
||||
else
|
||||
echo "UPDATELOG.md file not found"
|
||||
fi
|
||||
shell: bash
|
||||
|
||||
- name: Set Env
|
||||
run: |
|
||||
echo "BUILDTIME=$(TZ=Asia/Shanghai date)" >> $GITHUB_ENV
|
||||
TAG_REF="${GITHUB_REF##*/}"
|
||||
echo "TAG_NAME=$TAG_REF" >> $GITHUB_ENV
|
||||
VERSION=$(echo "$TAG_REF" | sed 's/^v//')
|
||||
echo "VERSION=$VERSION" >> $GITHUB_ENV
|
||||
echo "DOWNLOAD_URL=https://github.com/clash-verge-rev/clash-verge-rev/releases/download/$TAG_REF" >> $GITHUB_ENV
|
||||
shell: bash
|
||||
|
||||
- run: |
|
||||
if [ -z "$UPDATE_LOGS" ]; then
|
||||
echo "No update logs found, using default message"
|
||||
UPDATE_LOGS="More new features are now supported. Check for detailed changelog soon."
|
||||
else
|
||||
echo "Using found update logs"
|
||||
fi
|
||||
|
||||
cat > release.txt << EOF
|
||||
$UPDATE_LOGS
|
||||
|
||||
## 下载地址
|
||||
|
||||
### Windows (不再支持Win7)
|
||||
#### 正常版本(推荐)
|
||||
- 64位(常用): [clash-verge_${{ env.VERSION }}_x64-setup.exe](${{ env.DOWNLOAD_URL }}/clash-verge_${{ env.VERSION }}_x64-setup.exe)
|
||||
- ARM64(不常用): [clash-verge_${{ env.VERSION }}_arm64-setup.exe](${{ env.DOWNLOAD_URL }}/clash-verge_${{ env.VERSION }}_arm64-setup.exe)
|
||||
|
||||
#### 内置Webview2版(体积较大,仅在企业版系统或无法安装webview2时使用)
|
||||
- 64位: [clash-verge_${{ env.VERSION }}_x64_fixed_webview2-setup.exe](${{ env.DOWNLOAD_URL }}/clash-verge_${{ env.VERSION }}_x64_fixed_webview2-setup.exe)
|
||||
- ARM64: [clash-verge_${{ env.VERSION }}_arm64_fixed_webview2-setup.exe](${{ env.DOWNLOAD_URL }}/clash-verge_${{ env.VERSION }}_arm64_fixed_webview2-setup.exe)
|
||||
|
||||
### macOS
|
||||
- Apple M芯片: [clash-verge_${{ env.VERSION }}_aarch64.dmg](${{ env.DOWNLOAD_URL }}/clash-verge_${{ env.VERSION }}_aarch64.dmg)
|
||||
- Intel芯片: [clash-verge_${{ env.VERSION }}_x64.dmg](${{ env.DOWNLOAD_URL }}/clash-verge_${{ env.VERSION }}_x64.dmg)
|
||||
|
||||
### Linux
|
||||
#### DEB包(Debian系) 使用 apt ./路径 安装
|
||||
- 64位: [clash-verge_${{ env.VERSION }}_amd64.deb](${{ env.DOWNLOAD_URL }}/clash-verge_${{ env.VERSION }}_amd64.deb)
|
||||
- ARM64: [clash-verge_${{ env.VERSION }}_arm64.deb](${{ env.DOWNLOAD_URL }}/clash-verge_${{ env.VERSION }}_arm64.deb)
|
||||
- ARMv7: [clash-verge_${{ env.VERSION }}_armhf.deb](${{ env.DOWNLOAD_URL }}/clash-verge_${{ env.VERSION }}_armhf.deb)
|
||||
|
||||
#### RPM包(Redhat系) 使用 dnf ./路径 安装
|
||||
- 64位: [clash-verge_${{ env.VERSION }}_amd64.rpm](${{ env.DOWNLOAD_URL }}/clash-verge_${{ env.VERSION }}_amd64.rpm)
|
||||
- ARM64: [clash-verge_${{ env.VERSION }}_aarch64.rpm](${{ env.DOWNLOAD_URL }}/clash-verge_${{ env.VERSION }}_aarch64.rpm)
|
||||
- ARMv7: [clash-verge_${{ env.VERSION }}_armhfp.rpm](${{ env.DOWNLOAD_URL }}/clash-verge_${{ env.VERSION }}_armhfp.rpm)
|
||||
|
||||
### FAQ
|
||||
- [常见问题](https://clash-verge-rev.github.io/faq/windows.html)
|
||||
|
||||
### 稳定机场VPN推荐
|
||||
- [狗狗加速](https://verge.dginv.click/#/register?code=oaxsAGo6)
|
||||
Created at ${{ env.BUILDTIME }}.
|
||||
EOF
|
||||
|
||||
- name: Upload Release
|
||||
uses: softprops/action-gh-release@v2
|
||||
with:
|
||||
tag_name: ${{ env.TAG_NAME }}
|
||||
name: "Clash Verge Rev ${{ env.TAG_NAME }}"
|
||||
body_path: release.txt
|
||||
prerelease: false
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
generate_release_notes: true
|
||||
|
||||
release:
|
||||
name: Release Build
|
||||
needs: check_tag_version
|
||||
needs: [check_tag_version, update_tag]
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
@@ -112,12 +203,13 @@ jobs:
|
||||
with:
|
||||
tagName: v__VERSION__
|
||||
releaseName: "Clash Verge Rev v__VERSION__"
|
||||
releaseBody: "More new features are now supported."
|
||||
releaseBody: "See release notes for detailed changelog."
|
||||
tauriScript: pnpm
|
||||
args: --target ${{ matrix.target }}
|
||||
|
||||
release-for-linux-arm:
|
||||
name: Release Build for Linux ARM
|
||||
needs: [check_tag_version, update_tag]
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
@@ -232,7 +324,7 @@ jobs:
|
||||
with:
|
||||
tag_name: v${{env.VERSION}}
|
||||
name: "Clash Verge Rev v${{env.VERSION}}"
|
||||
body: "More new features are now supported."
|
||||
body: "See release notes for detailed changelog."
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
files: |
|
||||
src-tauri/target/${{ matrix.target }}/release/bundle/deb/*.deb
|
||||
@@ -240,6 +332,7 @@ jobs:
|
||||
|
||||
release-for-fixed-webview2:
|
||||
name: Release Build for Fixed WebView2
|
||||
needs: [check_tag_version, update_tag]
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
@@ -323,7 +416,7 @@ jobs:
|
||||
with:
|
||||
tag_name: v${{steps.build.outputs.appVersion}}
|
||||
name: "Clash Verge Rev v${{steps.build.outputs.appVersion}}"
|
||||
body: "More new features are now supported."
|
||||
body: "See release notes for detailed changelog."
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
files: src-tauri/target/${{ matrix.target }}/release/bundle/nsis/*setup*
|
||||
|
||||
@@ -405,3 +498,39 @@ jobs:
|
||||
release-tag: v${{env.VERSION}}
|
||||
installers-regex: '_(arm64|x64|x86)-setup\.exe$'
|
||||
token: ${{ secrets.WINGET_TOKEN }}
|
||||
|
||||
notify-telegram:
|
||||
name: Notify Telegram
|
||||
runs-on: ubuntu-latest
|
||||
needs: [release-update]
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install Node
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: "22"
|
||||
|
||||
- uses: pnpm/action-setup@v4
|
||||
name: Install pnpm
|
||||
with:
|
||||
run_install: false
|
||||
|
||||
- name: Install dependencies
|
||||
run: pnpm install --frozen-lockfile
|
||||
|
||||
- name: Get Version and Release Info
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install jq
|
||||
echo "VERSION=$(cat package.json | jq '.version' | tr -d '"')" >> $GITHUB_ENV
|
||||
echo "DOWNLOAD_URL=https://github.com/clash-verge-rev/clash-verge-rev/releases/download/v$(cat package.json | jq '.version' | tr -d '"')" >> $GITHUB_ENV
|
||||
|
||||
- name: Send Telegram Notification
|
||||
run: node scripts/telegram.mjs
|
||||
env:
|
||||
TELEGRAM_BOT_TOKEN: ${{ secrets.TELEGRAM_BOT_TOKEN }}
|
||||
BUILD_TYPE: release
|
||||
VERSION: ${{ env.VERSION }}
|
||||
DOWNLOAD_URL: ${{ env.DOWNLOAD_URL }}
|
||||
|
||||
Reference in New Issue
Block a user