Skip to content

Commit 6330a52

Browse files
ci(release): manual dispatch with bump type, auto minor on new core binaries
1 parent 1ff5bca commit 6330a52

1 file changed

Lines changed: 9 additions & 10 deletions

File tree

.github/workflows/release.yml

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,14 @@ name: Release
22

33
on:
44
schedule:
5-
- cron: "0 3 */3 * *"
5+
- cron: "0 3 * * 1" # every Monday — check for new core binaries
66
workflow_dispatch:
77
inputs:
8-
force:
9-
description: 'Force release even without changes'
10-
type: boolean
11-
default: false
8+
bump:
9+
description: 'Version bump type'
10+
type: choice
11+
options: [patch, minor, major]
12+
default: patch
1213
skip_bump:
1314
description: 'Skip version bump (use current version)'
1415
type: boolean
@@ -74,17 +75,15 @@ jobs:
7475
[ "$pinned_t2s" != "$latest_t2s" ] && { skip=false; bins_changed=true; }
7576
[ "$pinned_sb" != "$latest_sb" ] && { skip=false; bins_changed=true; }
7677
77-
# bump type: minor if code changed, patch if only binaries updated
78-
if [ "$has_code_commits" = "true" ]; then
78+
if [ "$bins_changed" = "true" ]; then
7979
echo "bump=minor" >> "$GITHUB_OUTPUT"
8080
else
81-
echo "bump=patch" >> "$GITHUB_OUTPUT"
81+
echo "bump=${{ inputs.bump || 'patch' }}" >> "$GITHUB_OUTPUT"
8282
fi
8383
8484
echo "xray_old=$pinned_xray" >> "$GITHUB_OUTPUT"
8585
echo "t2s_old=$pinned_t2s" >> "$GITHUB_OUTPUT"
8686
echo "sb_old=$pinned_sb" >> "$GITHUB_OUTPUT"
87-
[ "${{ inputs.force }}" = "true" ] && skip=false
8887
echo "skip=$skip" >> "$GITHUB_OUTPUT"
8988
echo "xray_version=$latest_xray" >> "$GITHUB_OUTPUT"
9089
echo "t2s_version=$latest_t2s" >> "$GITHUB_OUTPUT"
@@ -153,7 +152,7 @@ jobs:
153152
if [ "${{ inputs.skip_bump }}" = "true" ]; then
154153
version=$(grep -m1 '^version=' module/module.prop | cut -d= -f2)
155154
else
156-
version=$(scripts/bump-version.sh ${{ steps.changes.outputs.bump }})
155+
version=$(scripts/bump-version.sh ${{ inputs.bump || 'patch' }})
157156
fi
158157
echo "version=$version" >> "$GITHUB_OUTPUT"
159158

0 commit comments

Comments
 (0)