Skip to content

Commit abca6fe

Browse files
committed
fix(release): correct version detection + workflow changes
1 parent 85b1e41 commit abca6fe

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

.github/workflows/build-images.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,21 @@ jobs:
112112
case "$V" in
113113
v[0-9]*) V="${V#v}" ;;
114114
esac
115+
# Guard rail: the ref actually built is whatever's picked in the
116+
# "Use workflow from" branch/tag selector at the top of the Run
117+
# workflow form -- a control separate from the "version" text
118+
# input below, defaults to "master", and is easy to leave
119+
# unchanged. Refuse to silently turn a forgotten default into a
120+
# release named "master"/"dev"/etc; require something that
121+
# actually looks like a release ref (starts with a digit, same
122+
# shape the tag-push trigger requires).
123+
case "$V" in
124+
[0-9]*) : ;;
125+
*)
126+
echo "::error::make_release is checked but the ref actually built ('${{ github.ref_name }}') doesn't look like a release branch/tag (expected e.g. 10.0-beta or v10.0-beta). This is controlled by the 'Use workflow from' picker at the top of the Run workflow form, NOT the 'version' text box -- it defaults to 'master', so it's easy to leave unchanged by mistake. Refusing to create a release named '${{ github.ref_name }}'."
127+
exit 1
128+
;;
129+
esac
115130
echo "is_release=true" >> "$GITHUB_OUTPUT"
116131
echo "is_nightly=false" >> "$GITHUB_OUTPUT"
117132
# Manual dispatch with explicit version -> one-off build

0 commit comments

Comments
 (0)