Skip to content

Commit fabb56c

Browse files
authored
ci: validate release version (#2246)
1 parent 88db14c commit fabb56c

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

.github/workflows/release.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,19 @@ jobs:
3636
id-token: write # IMPORTANT: mandatory for trusted publishing
3737
attestations: write # IMPORTANT: mandatory for attestations
3838
steps:
39+
- name: Validate source branch and the version
40+
shell: bash
41+
env:
42+
VERSION: ${{ github.event.inputs.version }}
43+
SOURCE_BRANCH: ${{ github.event.inputs.sourceBranch }}
44+
run: |
45+
version="$VERSION"
46+
sourceBranch="$SOURCE_BRANCH"
47+
if [[ "$version" != 2.* ]]; then
48+
echo "The version input '$version' is invalid. This workflow only supports versions starting with '2.'."
49+
exit 1
50+
fi
51+
3952
- name: Checkout timefold-solver
4053
uses: actions/checkout@v6
4154
with:

0 commit comments

Comments
 (0)