mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-01-29 08:45:41 +08:00
feat: enhance workflow configurations for alpha and autobuild processes
This commit is contained in:
266
.github/workflows/alpha.yml
vendored
266
.github/workflows/alpha.yml
vendored
@@ -2,123 +2,133 @@ name: Alpha Build
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
# schedule:
|
push:
|
||||||
# UTC+8 0,6,12,18
|
tags:
|
||||||
# - cron: "0 16,22,4,10 * * *"
|
- "v*.*.*-alpha*"
|
||||||
permissions: write-all
|
permissions: write-all
|
||||||
env:
|
env:
|
||||||
|
TAG_NAME: alpha
|
||||||
|
TAG_CHANNEL: Alpha
|
||||||
CARGO_INCREMENTAL: 0
|
CARGO_INCREMENTAL: 0
|
||||||
RUST_BACKTRACE: short
|
RUST_BACKTRACE: short
|
||||||
concurrency:
|
concurrency:
|
||||||
# only allow per workflow per commit (and not pr) to run at a time
|
|
||||||
group: "${{ github.workflow }} - ${{ github.head_ref || github.ref }}"
|
group: "${{ github.workflow }} - ${{ github.head_ref || github.ref }}"
|
||||||
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
check_commit:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
outputs:
|
|
||||||
should_run: ${{ steps.check.outputs.should_run }}
|
|
||||||
steps:
|
|
||||||
- name: Checkout repository
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
fetch-depth: 2
|
|
||||||
|
|
||||||
- name: Check if version changed or src changed
|
|
||||||
id: check
|
|
||||||
run: |
|
|
||||||
# For manual workflow_dispatch, always run
|
|
||||||
if [ "${{ github.event_name }}" == "workflow_dispatch" ]; then
|
|
||||||
echo "should_run=true" >> $GITHUB_OUTPUT
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Store current version from package.json
|
|
||||||
CURRENT_VERSION=$(cat package.json | jq -r '.version')
|
|
||||||
echo "Current version: $CURRENT_VERSION"
|
|
||||||
|
|
||||||
# Get the previous commit's package.json version
|
|
||||||
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
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Check if src or src-tauri directories changed
|
|
||||||
CURRENT_SRC_HASH=$(git rev-parse HEAD:src)
|
|
||||||
PREVIOUS_SRC_HASH=$(git rev-parse HEAD~1:src 2>/dev/null || echo "")
|
|
||||||
CURRENT_TAURI_HASH=$(git rev-parse HEAD:src-tauri 2>/dev/null || echo "")
|
|
||||||
PREVIOUS_TAURI_HASH=$(git rev-parse HEAD~1:src-tauri 2>/dev/null || echo "")
|
|
||||||
|
|
||||||
echo "Current src hash: $CURRENT_SRC_HASH"
|
|
||||||
echo "Previous src hash: $PREVIOUS_SRC_HASH"
|
|
||||||
echo "Current tauri hash: $CURRENT_TAURI_HASH"
|
|
||||||
echo "Previous tauri hash: $PREVIOUS_TAURI_HASH"
|
|
||||||
|
|
||||||
if [ "$CURRENT_SRC_HASH" != "$PREVIOUS_SRC_HASH" ] || [ "$CURRENT_TAURI_HASH" != "$PREVIOUS_TAURI_HASH" ]; then
|
|
||||||
echo "Source directories changed"
|
|
||||||
echo "should_run=true" >> $GITHUB_OUTPUT
|
|
||||||
else
|
|
||||||
echo "Version and source directories unchanged"
|
|
||||||
echo "should_run=false" >> $GITHUB_OUTPUT
|
|
||||||
fi
|
|
||||||
|
|
||||||
delete_old_assets:
|
delete_old_assets:
|
||||||
needs: check_commit
|
name: Delete Old Alpha Release Assets and Tags
|
||||||
if: ${{ needs.check_commit.outputs.should_run == 'true' }}
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Delete Old Alpha Release Assets
|
- name: Delete Old Alpha Tags Except Latest
|
||||||
uses: actions/github-script@v7
|
uses: actions/github-script@v7
|
||||||
with:
|
with:
|
||||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
script: |
|
script: |
|
||||||
const releaseTag = 'alpha';
|
const tagPattern = /-alpha.*/; // 匹配带有 -alpha 的 tag
|
||||||
|
const owner = context.repo.owner;
|
||||||
|
const repo = context.repo.repo;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
// Get the release by tag name
|
// 获取所有 tag
|
||||||
const { data: release } = await github.rest.repos.getReleaseByTag({
|
const { data: tags } = await github.rest.repos.listTags({
|
||||||
owner: context.repo.owner,
|
owner,
|
||||||
repo: context.repo.repo,
|
repo,
|
||||||
tag: releaseTag
|
per_page: 100 // 调整 per_page 以获取更多 tag
|
||||||
});
|
});
|
||||||
|
|
||||||
console.log(`Found release with ID: ${release.id}`);
|
// 过滤出包含 -alpha 的 tag
|
||||||
|
const alphaTags = (await Promise.all(
|
||||||
|
tags
|
||||||
|
.filter(tag => tagPattern.test(tag.name))
|
||||||
|
.map(async tag => {
|
||||||
|
// 获取每个 tag 的 commit 信息以获得日期
|
||||||
|
const { data: commit } = await github.rest.repos.getCommit({
|
||||||
|
owner,
|
||||||
|
repo,
|
||||||
|
ref: tag.commit.sha
|
||||||
|
});
|
||||||
|
return {
|
||||||
|
...tag,
|
||||||
|
commitDate: commit.committer && commit.committer.date ? commit.committer.date : commit.commit.author.date
|
||||||
|
};
|
||||||
|
})
|
||||||
|
)).sort((a, b) => {
|
||||||
|
// 按 commit 日期降序排序(最新的在前面)
|
||||||
|
return new Date(b.commitDate) - new Date(a.commitDate);
|
||||||
|
});
|
||||||
|
|
||||||
// Delete each asset
|
console.log(`Found ${alphaTags.length} alpha tags`);
|
||||||
|
|
||||||
|
if (alphaTags.length === 0) {
|
||||||
|
console.log('No alpha tags found');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 保留最新的 tag
|
||||||
|
const latestTag = alphaTags[0];
|
||||||
|
console.log(`Keeping latest alpha tag: ${latestTag.name}`);
|
||||||
|
|
||||||
|
// 处理其他旧的 alpha tag
|
||||||
|
for (const tag of alphaTags.slice(1)) {
|
||||||
|
console.log(`Processing tag: ${tag.name}`);
|
||||||
|
|
||||||
|
// 获取与 tag 关联的 release
|
||||||
|
try {
|
||||||
|
const { data: release } = await github.rest.repos.getReleaseByTag({
|
||||||
|
owner,
|
||||||
|
repo,
|
||||||
|
tag: tag.name
|
||||||
|
});
|
||||||
|
|
||||||
|
// 删除 release 下的所有资产
|
||||||
if (release.assets && release.assets.length > 0) {
|
if (release.assets && release.assets.length > 0) {
|
||||||
console.log(`Deleting ${release.assets.length} assets`);
|
console.log(`Deleting ${release.assets.length} assets for release ${tag.name}`);
|
||||||
|
|
||||||
for (const asset of release.assets) {
|
for (const asset of release.assets) {
|
||||||
console.log(`Deleting asset: ${asset.name} (${asset.id})`);
|
console.log(`Deleting asset: ${asset.name} (${asset.id})`);
|
||||||
await github.rest.repos.deleteReleaseAsset({
|
await github.rest.repos.deleteReleaseAsset({
|
||||||
owner: context.repo.owner,
|
owner,
|
||||||
repo: context.repo.repo,
|
repo,
|
||||||
asset_id: asset.id
|
asset_id: asset.id
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log('All assets deleted successfully');
|
|
||||||
} else {
|
|
||||||
console.log('No assets found to delete');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 删除 release
|
||||||
|
console.log(`Deleting release for tag: ${tag.name}`);
|
||||||
|
await github.rest.repos.deleteRelease({
|
||||||
|
owner,
|
||||||
|
repo,
|
||||||
|
release_id: release.id
|
||||||
|
});
|
||||||
|
|
||||||
|
// 删除 tag
|
||||||
|
console.log(`Deleting tag: ${tag.name}`);
|
||||||
|
await github.rest.git.deleteRef({
|
||||||
|
owner,
|
||||||
|
repo,
|
||||||
|
ref: `tags/${tag.name}`
|
||||||
|
});
|
||||||
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
if (error.status === 404) {
|
if (error.status === 404) {
|
||||||
console.log('Release not found, nothing to delete');
|
console.log(`No release found for tag ${tag.name}, deleting tag directly`);
|
||||||
|
await github.rest.git.deleteRef({
|
||||||
|
owner,
|
||||||
|
repo,
|
||||||
|
ref: `tags/${tag.name}`
|
||||||
|
});
|
||||||
} else {
|
} else {
|
||||||
console.error('Error:', error);
|
console.error(`Error processing tag ${tag.name}:`, error);
|
||||||
throw error;
|
throw error;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
console.log('Old alpha tags and releases deleted successfully');
|
||||||
|
} catch (error) {
|
||||||
|
console.error('Error:', error);
|
||||||
|
throw error;
|
||||||
|
}
|
||||||
|
|
||||||
update_tag:
|
update_tag:
|
||||||
name: Update tag
|
name: Update tag
|
||||||
@@ -128,22 +138,18 @@ jobs:
|
|||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Fetch Alpha update logs
|
- name: Fetch UPDATE logs
|
||||||
id: fetch_alpha_logs
|
id: fetch_update_logs
|
||||||
run: |
|
run: |
|
||||||
# Check if UPDATELOG.md exists
|
|
||||||
if [ -f "UPDATELOG.md" ]; then
|
if [ -f "UPDATELOG.md" ]; then
|
||||||
# Extract the section starting with ## and containing -alpha until the next ## or end of file
|
UPDATE_LOGS=$(awk '/^## v/{if(flag) exit; flag=1} flag' UPDATELOG.md)
|
||||||
# ALPHA_LOGS=$(awk '/^## .*-alpha/{flag=1; print; next} /^## /{flag=0} flag' UPDATELOG.md)
|
if [ -n "$UPDATE_LOGS" ]; then
|
||||||
ALPHA_LOGS=$(awk '/^## v/{if(flag) exit; flag=1} flag' UPDATELOG.md)
|
echo "Found update logs"
|
||||||
|
echo "UPDATE_LOGS<<EOF" >> $GITHUB_ENV
|
||||||
if [ -n "$ALPHA_LOGS" ]; then
|
echo "$UPDATE_LOGS" >> $GITHUB_ENV
|
||||||
echo "Found alpha update logs"
|
|
||||||
echo "ALPHA_LOGS<<EOF" >> $GITHUB_ENV
|
|
||||||
echo "$ALPHA_LOGS" >> $GITHUB_ENV
|
|
||||||
echo "EOF" >> $GITHUB_ENV
|
echo "EOF" >> $GITHUB_ENV
|
||||||
else
|
else
|
||||||
echo "No alpha sections found in UPDATELOG.md"
|
echo "No update sections found in UPDATELOG.md"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
echo "UPDATELOG.md file not found"
|
echo "UPDATELOG.md file not found"
|
||||||
@@ -156,17 +162,15 @@ jobs:
|
|||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
- run: |
|
- run: |
|
||||||
# 检查 ALPHA_LOGS 是否存在,如果不存在则使用默认消息
|
if [ -z "$UPDATE_LOGS" ]; then
|
||||||
if [ -z "$ALPHA_LOGS" ]; then
|
echo "No update logs found, using default message"
|
||||||
echo "No alpha logs found, using default message"
|
UPDATE_LOGS="More new features are now supported. Check for detailed changelog soon."
|
||||||
ALPHA_LOGS="More new features are now supported. Check for detailed changelog soon."
|
|
||||||
else
|
else
|
||||||
echo "Using found alpha logs"
|
echo "Using found update logs"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# 生成 release.txt 文件
|
|
||||||
cat > release.txt << EOF
|
cat > release.txt << EOF
|
||||||
$ALPHA_LOGS
|
$UPDATE_LOGS
|
||||||
|
|
||||||
## 我应该下载哪个版本?
|
## 我应该下载哪个版本?
|
||||||
|
|
||||||
@@ -189,7 +193,6 @@ jobs:
|
|||||||
- arm64架构: arm64_fixed_webview2-setup.exe
|
- arm64架构: arm64_fixed_webview2-setup.exe
|
||||||
|
|
||||||
### FAQ
|
### FAQ
|
||||||
|
|
||||||
- [常见问题](https://clash-verge-rev.github.io/faq/windows.html)
|
- [常见问题](https://clash-verge-rev.github.io/faq/windows.html)
|
||||||
|
|
||||||
### 稳定机场VPN推荐
|
### 稳定机场VPN推荐
|
||||||
@@ -201,14 +204,15 @@ jobs:
|
|||||||
- name: Upload Release
|
- name: Upload Release
|
||||||
uses: softprops/action-gh-release@v2
|
uses: softprops/action-gh-release@v2
|
||||||
with:
|
with:
|
||||||
tag_name: alpha
|
tag_name: ${{ env.TAG_NAME }}
|
||||||
name: "Clash Verge Rev Alpha"
|
name: "Clash Verge Rev ${{ env.TAG_CHANNEL }}"
|
||||||
body_path: release.txt
|
body_path: release.txt
|
||||||
prerelease: true
|
prerelease: true
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
generate_release_notes: true
|
generate_release_notes: true
|
||||||
|
|
||||||
alpha:
|
alpha-x86-windows-macos-linux:
|
||||||
|
name: Alpha x86 Windows, MacOS and Linux
|
||||||
needs: update_tag
|
needs: update_tag
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
@@ -224,7 +228,6 @@ jobs:
|
|||||||
target: x86_64-apple-darwin
|
target: x86_64-apple-darwin
|
||||||
- os: ubuntu-22.04
|
- os: ubuntu-22.04
|
||||||
target: x86_64-unknown-linux-gnu
|
target: x86_64-unknown-linux-gnu
|
||||||
|
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout Repository
|
- name: Checkout Repository
|
||||||
@@ -264,11 +267,8 @@ jobs:
|
|||||||
pnpm i
|
pnpm i
|
||||||
pnpm check ${{ matrix.target }}
|
pnpm check ${{ matrix.target }}
|
||||||
|
|
||||||
- name: Release Alpha Version
|
# - name: Release ${{ env.TAG_CHANNEL }} Version
|
||||||
run: pnpm release-alpha-version
|
# run: pnpm release-version ${{ env.TAG_NAME }}
|
||||||
|
|
||||||
- name: Patch Alpha Hash
|
|
||||||
run: pnpm fix-alpha-version
|
|
||||||
|
|
||||||
- name: Tauri build
|
- name: Tauri build
|
||||||
uses: tauri-apps/tauri-action@v0
|
uses: tauri-apps/tauri-action@v0
|
||||||
@@ -284,15 +284,16 @@ jobs:
|
|||||||
APPLE_PASSWORD: ${{ secrets.APPLE_PASSWORD }}
|
APPLE_PASSWORD: ${{ secrets.APPLE_PASSWORD }}
|
||||||
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
|
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
|
||||||
with:
|
with:
|
||||||
tagName: alpha
|
tagName: ${{ env.TAG_NAME }}
|
||||||
releaseName: "Clash Verge Rev Alpha"
|
releaseName: "Clash Verge Rev ${{ env.TAG_CHANNEL }}"
|
||||||
releaseBody: "More new features are now supported."
|
releaseBody: "More new features are now supported."
|
||||||
releaseDraft: false
|
releaseDraft: false
|
||||||
prerelease: true
|
prerelease: true
|
||||||
tauriScript: pnpm
|
tauriScript: pnpm
|
||||||
args: --target ${{ matrix.target }}
|
args: --target ${{ matrix.target }}
|
||||||
|
|
||||||
alpha-for-linux-arm:
|
alpha-arm-linux:
|
||||||
|
name: Alpha ARM Linux
|
||||||
needs: update_tag
|
needs: update_tag
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
@@ -336,14 +337,11 @@ jobs:
|
|||||||
pnpm i
|
pnpm i
|
||||||
pnpm check ${{ matrix.target }}
|
pnpm check ${{ matrix.target }}
|
||||||
|
|
||||||
- name: Release Alpha Version
|
# - name: Release ${{ env.TAG_CHANNEL }} Version
|
||||||
run: pnpm release-alpha-version
|
# run: pnpm release-version ${{ env.TAG_NAME }}
|
||||||
|
|
||||||
- name: Patch Alpha Hash
|
- name: Setup for linux
|
||||||
run: pnpm fix-alpha-version
|
run: |
|
||||||
|
|
||||||
- name: "Setup for linux"
|
|
||||||
run: |-
|
|
||||||
sudo ls -lR /etc/apt/
|
sudo ls -lR /etc/apt/
|
||||||
|
|
||||||
cat > /tmp/sources.list << EOF
|
cat > /tmp/sources.list << EOF
|
||||||
@@ -377,14 +375,14 @@ jobs:
|
|||||||
patchelf:${{ matrix.arch }} \
|
patchelf:${{ matrix.arch }} \
|
||||||
librsvg2-dev:${{ matrix.arch }}
|
librsvg2-dev:${{ matrix.arch }}
|
||||||
|
|
||||||
- name: "Install aarch64 tools"
|
- name: Install aarch64 tools
|
||||||
if: matrix.target == 'aarch64-unknown-linux-gnu'
|
if: matrix.target == 'aarch64-unknown-linux-gnu'
|
||||||
run: |
|
run: |
|
||||||
sudo apt install -y \
|
sudo apt install -y \
|
||||||
gcc-aarch64-linux-gnu \
|
gcc-aarch64-linux-gnu \
|
||||||
g++-aarch64-linux-gnu
|
g++-aarch64-linux-gnu
|
||||||
|
|
||||||
- name: "Install armv7 tools"
|
- name: Install armv7 tools
|
||||||
if: matrix.target == 'armv7-unknown-linux-gnueabihf'
|
if: matrix.target == 'armv7-unknown-linux-gnueabihf'
|
||||||
run: |
|
run: |
|
||||||
sudo apt install -y \
|
sudo apt install -y \
|
||||||
@@ -417,15 +415,16 @@ jobs:
|
|||||||
- name: Upload Release
|
- name: Upload Release
|
||||||
uses: softprops/action-gh-release@v2
|
uses: softprops/action-gh-release@v2
|
||||||
with:
|
with:
|
||||||
tag_name: alpha
|
tag_name: ${{ env.TAG_NAME }}
|
||||||
name: "Clash Verge Rev Alpha"
|
name: "Clash Verge Rev ${{ env.TAG_CHANNEL }}"
|
||||||
prerelease: true
|
prerelease: true
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
files: |
|
files: |
|
||||||
src-tauri/target/${{ matrix.target }}/release/bundle/deb/*.deb
|
src-tauri/target/${{ matrix.target }}/release/bundle/deb/*.deb
|
||||||
src-tauri/target/${{ matrix.target }}/release/bundle/rpm/*.rpm
|
src-tauri/target/${{ matrix.target }}/release/bundle/rpm/*.rpm
|
||||||
|
|
||||||
alpha-for-fixed-webview2:
|
alpha-x86-arm-windows_webview2:
|
||||||
|
name: Alpha x86 and ARM Windows with WebView2
|
||||||
needs: update_tag
|
needs: update_tag
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
@@ -467,11 +466,8 @@ jobs:
|
|||||||
pnpm i
|
pnpm i
|
||||||
pnpm check ${{ matrix.target }}
|
pnpm check ${{ matrix.target }}
|
||||||
|
|
||||||
- name: Release Alpha Version
|
# - name: Release ${{ env.TAG_CHANNEL }} Version
|
||||||
run: pnpm release-alpha-version
|
# run: pnpm release-version ${{ env.TAG_NAME }}
|
||||||
|
|
||||||
- name: Patch Alpha Hash
|
|
||||||
run: pnpm fix-alpha-version
|
|
||||||
|
|
||||||
- name: Download WebView2 Runtime
|
- name: Download WebView2 Runtime
|
||||||
run: |
|
run: |
|
||||||
@@ -515,13 +511,13 @@ jobs:
|
|||||||
- name: Upload Release
|
- name: Upload Release
|
||||||
uses: softprops/action-gh-release@v2
|
uses: softprops/action-gh-release@v2
|
||||||
with:
|
with:
|
||||||
tag_name: alpha
|
tag_name: ${{ env.TAG_NAME }}
|
||||||
name: "Clash Verge Rev Alpha"
|
name: "Clash Verge Rev ${{ env.TAG_CHANNEL }}"
|
||||||
prerelease: true
|
prerelease: true
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
files: src-tauri/target/${{ matrix.target }}/release/bundle/nsis/*setup*
|
files: src-tauri/target/${{ matrix.target }}/release/bundle/nsis/*setup*
|
||||||
|
|
||||||
- name: Portable Bundle
|
- name: Portable Bundle
|
||||||
run: pnpm portable-fixed-webview2 ${{ matrix.target }} --alpha
|
run: pnpm portable-fixed-webview2 ${{ matrix.target }} --${{ env.TAG_NAME }}
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|||||||
23
.github/workflows/autobuild.yml
vendored
23
.github/workflows/autobuild.yml
vendored
@@ -8,6 +8,7 @@ on:
|
|||||||
permissions: write-all
|
permissions: write-all
|
||||||
env:
|
env:
|
||||||
TAG_NAME: autobuild
|
TAG_NAME: autobuild
|
||||||
|
TAG_CHANNEL: AutoBuild
|
||||||
CARGO_INCREMENTAL: 0
|
CARGO_INCREMENTAL: 0
|
||||||
RUST_BACKTRACE: short
|
RUST_BACKTRACE: short
|
||||||
concurrency:
|
concurrency:
|
||||||
@@ -143,7 +144,7 @@ jobs:
|
|||||||
uses: softprops/action-gh-release@v2
|
uses: softprops/action-gh-release@v2
|
||||||
with:
|
with:
|
||||||
tag_name: ${{ env.TAG_NAME }}
|
tag_name: ${{ env.TAG_NAME }}
|
||||||
name: "Clash Verge Rev AutoBuild"
|
name: "Clash Verge Rev ${{ env.TAG_CHANNEL }}"
|
||||||
body_path: release.txt
|
body_path: release.txt
|
||||||
prerelease: true
|
prerelease: true
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -205,8 +206,8 @@ jobs:
|
|||||||
pnpm i
|
pnpm i
|
||||||
pnpm check ${{ matrix.target }}
|
pnpm check ${{ matrix.target }}
|
||||||
|
|
||||||
- name: Release Autobuild Version
|
- name: Release ${{ env.TAG_CHANNEL }} Version
|
||||||
run: pnpm release-version autobuild
|
run: pnpm release-version ${{ env.TAG_NAME }}
|
||||||
|
|
||||||
- name: Tauri build
|
- name: Tauri build
|
||||||
uses: tauri-apps/tauri-action@v0
|
uses: tauri-apps/tauri-action@v0
|
||||||
@@ -223,7 +224,7 @@ jobs:
|
|||||||
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
|
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
|
||||||
with:
|
with:
|
||||||
tagName: ${{ env.TAG_NAME }}
|
tagName: ${{ env.TAG_NAME }}
|
||||||
releaseName: "Clash Verge Rev AutoBuild"
|
releaseName: "Clash Verge Rev ${{ env.TAG_CHANNEL }}"
|
||||||
releaseBody: "More new features are now supported."
|
releaseBody: "More new features are now supported."
|
||||||
releaseDraft: false
|
releaseDraft: false
|
||||||
prerelease: true
|
prerelease: true
|
||||||
@@ -275,8 +276,8 @@ jobs:
|
|||||||
pnpm i
|
pnpm i
|
||||||
pnpm check ${{ matrix.target }}
|
pnpm check ${{ matrix.target }}
|
||||||
|
|
||||||
- name: Release Autobuild Version
|
- name: Release ${{ env.TAG_CHANNEL }} Version
|
||||||
run: pnpm release-version autobuild
|
run: pnpm release-version ${{ env.TAG_NAME }}
|
||||||
|
|
||||||
- name: Setup for linux
|
- name: Setup for linux
|
||||||
run: |
|
run: |
|
||||||
@@ -354,7 +355,7 @@ jobs:
|
|||||||
uses: softprops/action-gh-release@v2
|
uses: softprops/action-gh-release@v2
|
||||||
with:
|
with:
|
||||||
tag_name: ${{ env.TAG_NAME }}
|
tag_name: ${{ env.TAG_NAME }}
|
||||||
name: "Clash Verge Rev AutoBuild"
|
name: "Clash Verge Rev ${{ env.TAG_CHANNEL }}"
|
||||||
prerelease: true
|
prerelease: true
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
files: |
|
files: |
|
||||||
@@ -404,8 +405,8 @@ jobs:
|
|||||||
pnpm i
|
pnpm i
|
||||||
pnpm check ${{ matrix.target }}
|
pnpm check ${{ matrix.target }}
|
||||||
|
|
||||||
- name: Release Autobuild Version
|
- name: Release ${{ env.TAG_CHANNEL }} Version
|
||||||
run: pnpm release-version autobuild
|
run: pnpm release-version ${{ env.TAG_NAME }}
|
||||||
|
|
||||||
- name: Download WebView2 Runtime
|
- name: Download WebView2 Runtime
|
||||||
run: |
|
run: |
|
||||||
@@ -450,12 +451,12 @@ jobs:
|
|||||||
uses: softprops/action-gh-release@v2
|
uses: softprops/action-gh-release@v2
|
||||||
with:
|
with:
|
||||||
tag_name: ${{ env.TAG_NAME }}
|
tag_name: ${{ env.TAG_NAME }}
|
||||||
name: "Clash Verge Rev AutoBuild"
|
name: "Clash Verge Rev ${{ env.TAG_CHANNEL }}"
|
||||||
prerelease: true
|
prerelease: true
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
files: src-tauri/target/${{ matrix.target }}/release/bundle/nsis/*setup*
|
files: src-tauri/target/${{ matrix.target }}/release/bundle/nsis/*setup*
|
||||||
|
|
||||||
- name: Portable Bundle
|
- name: Portable Bundle
|
||||||
run: pnpm portable-fixed-webview2 ${{ matrix.target }} --autobuild
|
run: pnpm portable-fixed-webview2 ${{ matrix.target }} --${{ env.TAG_NAME }}
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "clash-verge",
|
"name": "clash-verge",
|
||||||
"version": "2.3.0",
|
"version": "2.3.0-alpha.0",
|
||||||
"license": "GPL-3.0-only",
|
"license": "GPL-3.0-only",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "cross-env RUST_BACKTRACE=1 tauri dev -f verge-dev",
|
"dev": "cross-env RUST_BACKTRACE=1 tauri dev -f verge-dev",
|
||||||
|
|||||||
Reference in New Issue
Block a user