diff --git a/.github/workflows/autobuild.yml b/.github/workflows/autobuild.yml index c7d42f9c..0ef316c1 100644 --- a/.github/workflows/autobuild.yml +++ b/.github/workflows/autobuild.yml @@ -73,27 +73,27 @@ jobs: ### 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) + - 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) + - 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 }}_aarch64_fixed_webview2-setup.exe](${{ env.DOWNLOAD_URL }}/Clash.Verge_${{ env.VERSION }}_aarch64_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) + - 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) + - 64位: [Clash.Verge_${{ env.VERSION }}_amd64.deb](${{ env.DOWNLOAD_URL }}/Clash.Verge_${{ env.VERSION }}_amd64.deb) + - ARM64: [Clash.Verge_${{ env.VERSION }}_aarch64.deb](${{ env.DOWNLOAD_URL }}/Clash.Verge_${{ env.VERSION }}_aarch64.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) + - 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) @@ -450,11 +450,29 @@ jobs: notify-telegram: name: Notify Telegram runs-on: ubuntu-latest - needs: [autobuild-x86-windows-macos-linux, autobuild-arm-linux, autobuild-x86-arm-windows_webview2] + needs: [update_tag, autobuild-x86-windows-macos-linux, autobuild-arm-linux, autobuild-x86-arm-windows_webview2] 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<> $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: Install Node uses: actions/setup-node@v4 with: @@ -468,12 +486,63 @@ jobs: - name: Install dependencies run: pnpm install --frozen-lockfile + - name: Release AutoBuild Version + run: pnpm release-version autobuild-latest + - 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 + echo "BUILDTIME=$(TZ=Asia/Shanghai date)" >> $GITHUB_ENV + + - name: Generate release.txt + 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 }}_aarch64_fixed_webview2-setup.exe](${{ env.DOWNLOAD_URL }}/Clash.Verge_${{ env.VERSION }}_aarch64_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 }}_aarch64.deb](${{ env.DOWNLOAD_URL }}/Clash.Verge_${{ env.VERSION }}_aarch64.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: Send Telegram Notification run: node scripts/telegram.mjs diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index de658ea4..6237b590 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -502,11 +502,29 @@ jobs: notify-telegram: name: Notify Telegram runs-on: ubuntu-latest - needs: [release-update] + needs: [update_tag, release-update] 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<> $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: Install Node uses: actions/setup-node@v4 with: @@ -526,6 +544,53 @@ jobs: 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 + echo "BUILDTIME=$(TZ=Asia/Shanghai date)" >> $GITHUB_ENV + + - name: Generate release.txt + 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 }}_aarch64.deb](${{ env.DOWNLOAD_URL }}/Clash.Verge_${{ env.VERSION }}_aarch64.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: Send Telegram Notification run: node scripts/telegram.mjs