Skip to content

Commit dcc9c14

Browse files
chore: update release workflow
1 parent 1adfc21 commit dcc9c14

1 file changed

Lines changed: 17 additions & 3 deletions

File tree

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
# Should any of these axioms change, the release pipeline will need to be (significantly) refactored.
1010
# 0.8.x releases existed before this pipeline; they are done differently, similarities are coincidental.
1111

12-
name: Release
12+
name: Release Community 1.x to Maven Central
1313
on:
1414
workflow_dispatch:
1515
inputs:
@@ -21,9 +21,10 @@ on:
2121
default: 1.x
2222
required: true
2323
dryRun:
24-
description: 'Do a dry run? (true or false)'
24+
description: 'Do a dry run?'
2525
default: true
2626
required: true
27+
type: boolean
2728
jobs:
2829
build:
2930
env:
@@ -32,10 +33,23 @@ jobs:
3233
runs-on: self-hosted
3334
permissions:
3435
contents: write # IMPORTANT: required for action to create release branch
35-
pull-requests: write # IMPORTANT: so release PR can be created
3636
id-token: write # IMPORTANT: mandatory for trusted publishing
3737
attestations: write # IMPORTANT: mandatory for attestations
3838
steps:
39+
- name: Print inputs to the release workflow
40+
run: echo "${{ toJSON(github.event.inputs) }}"
41+
42+
- name: Validate the version
43+
shell: bash
44+
env:
45+
VERSION: ${{ github.event.inputs.version }}
46+
run: |
47+
version="$VERSION"
48+
if [[ "$version" != 1.* ]]; then
49+
echo "The version input '$version' is invalid. This workflow only supports versions starting with '1.'."
50+
exit 1
51+
fi
52+
3953
- name: Checkout timefold-solver
4054
uses: actions/checkout@v6
4155
with:

0 commit comments

Comments
 (0)