Skip to content

Commit c80b25d

Browse files
ci(release): only auto-release on schedule for upstream core bumps
The weekly cron previously cut a release whenever any code commit had landed in a build-affecting path, so every active week shipped a patch release on autopilot. Gate the code-commit trigger behind a non-schedule event: on the Monday cron only an upstream core bump (xray / tun2socks / sing-box) auto-releases, while a manual workflow_dispatch still releases on code commits as before. force=true is unchanged.
1 parent a8b7d90 commit c80b25d

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

.github/workflows/release.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,10 @@ jobs:
6161
run: |
6262
skip=true
6363
64-
# 1. New code commits (docs/ci/chore-only changes do not trigger release)
64+
# 1. New code commits (docs/ci/chore-only changes do not trigger release).
65+
# These only gate a *manual* run: on the weekly schedule we release
66+
# solely for upstream core bumps (below), never just because code
67+
# landed — cut a code release on demand via workflow_dispatch.
6568
last_tag=$(git describe --tags --abbrev=0 2>/dev/null || echo "")
6669
has_code_commits=false
6770
if [ -z "$last_tag" ]; then
@@ -83,7 +86,9 @@ jobs:
8386
2>/dev/null | wc -l)
8487
[ "$code_commits" -gt 0 ] && has_code_commits=true
8588
fi
86-
[ "$has_code_commits" = "true" ] && skip=false
89+
if [ "$has_code_commits" = "true" ] && [ "${{ github.event_name }}" != "schedule" ]; then
90+
skip=false
91+
fi
8792
8893
# 2. Upstream binary updates
8994
pinned_xray=$(grep -m1 'XRAY_VERSION=.*:-' scripts/core-versions.sh | sed 's/.*:-\([^}"]*\)}.*/\1/')

0 commit comments

Comments
 (0)