17
17
description : ' Release branch to create (e.g. 1.0.x for version 1.0.0; once created, branch protection rules apply)'
18
18
default : dry_run
19
19
required : true
20
- nextVersion :
21
- description : ' Next version after release (e.g. 1.1.0, -SNAPSHOT will be added automatically)'
22
- required : true
23
- nextMicroVersion :
24
- description : ' Next version after release for release branch (e.g. 1.0.1, -SNAPSHOT will be added automatically)'
25
- required : true
26
20
jobs :
27
21
build :
28
22
env :
29
23
MAVEN_ARGS : " --no-transfer-progress --batch-mode"
30
24
runs-on : ubuntu-latest
31
25
steps :
32
- - name : Print inputs to the release workflow
33
- run : echo "${{ toJSON(github.event.inputs) }}"
34
- - name : Checkout the relevant timefold-solver tag
26
+ - name : Checkout timefold-quickstarts
35
27
uses : actions/checkout@v4
36
28
with :
37
- repository : " TimefoldAI/timefold-solver"
38
- path : " ./timefold-solver"
39
29
fetch-depth : 0
40
- ref : v${{ github.event.inputs.version }}
41
30
42
31
- uses : actions/setup-java@v3
43
32
with :
50
39
with :
51
40
maven-version : 3.9.3
52
41
53
- # No need to wait for the upstream release to show up in Maven Central.
54
- - name : Build the upstream release tag
55
- working-directory : " ./timefold-solver"
56
- run : |
57
- mvn -Dquickly install
58
- cd ..
59
- rm -rf timefold-solver
60
-
61
- - name : Checkout timefold-quickstarts
62
- uses : actions/checkout@v4
63
- with :
64
- fetch-depth : 0
65
-
42
+ # This step will fail if the Solver binaries aren't already on Maven Central.
66
43
- name : Create release branch and build release
67
44
run : |
68
45
git config user.name "Timefold Release Bot"
72
49
export NEW_VERSION="${{ github.event.inputs.version }}"
73
50
.github/scripts/change_versions.sh
74
51
mvn verify
75
- git commit -am "chore : switch to version $NEW_VERSION"
52
+ git commit -am "build : switch to version $NEW_VERSION"
76
53
git tag -a "v${{ github.event.inputs.version }}" -m "Release version ${{ github.event.inputs.version }}"
77
54
git push --tags
78
55
@@ -87,30 +64,17 @@ jobs:
87
64
git merge -s ours --no-edit ${{ github.event.inputs.stableBranch }}
88
65
git checkout ${{ github.event.inputs.releaseBranch }}-bump
89
66
git merge --squash ${{ github.event.inputs.releaseBranch }}
90
- git commit -m "chore : release version ${{ github.event.inputs.version }}"
67
+ git commit -m "build : release version ${{ github.event.inputs.version }}"
91
68
git push origin ${{ github.event.inputs.releaseBranch }}-bump
92
- gh pr create --reviewer triceo,ge0ffrey --base ${{ github.event.inputs.stableBranch }} --head ${{ github.event.inputs.releaseBranch }}-bump --title "chore : release version ${{ github.event.inputs.version }}" --body-file .github/workflows/release-pr-body-stable .md
69
+ gh pr create --reviewer triceo --base ${{ github.event.inputs.stableBranch }} --head ${{ github.event.inputs.releaseBranch }}-bump --title "build : release version ${{ github.event.inputs.version }}" --body-file .github/workflows/release-pr-body.md
93
70
env :
94
71
GITHUB_TOKEN : ${{ secrets.JRELEASER_GITHUB_TOKEN }}
95
72
96
- - name : Set micro snapshot version on the release branch
73
+ - name : Put back the 999-SNAPSHOT version on the release branch
97
74
run : |
98
75
git checkout ${{ github.event.inputs.releaseBranch }}
99
76
export OLD_VERSION="$(find . -name pom.xml -exec grep '<version.ai.timefold.solver>' {} \;|tail -n 1|cut -d\> -f1 --complement|cut -d\< -f1)"
100
- export NEW_VERSION="${{ github.event.inputs.nextMicroVersion }}-SNAPSHOT"
101
- .github/scripts/change_versions.sh
102
- git commit -am "chore: switch to version $NEW_VERSION"
103
- git push origin ${{ github.event.inputs.releaseBranch }}
104
-
105
- - name : Switch development branch to next version and prepare PR
106
- run : |
107
- git checkout ${{ github.event.inputs.developmentBranch }}
108
- git checkout -B ${{ github.event.inputs.releaseBranch }}-bump2
109
- export OLD_VERSION="$(find . -name pom.xml -exec grep '<version.ai.timefold.solver>' {} \;|tail -n 1|cut -d\> -f1 --complement|cut -d\< -f1)"
110
- export NEW_VERSION="${{ github.event.inputs.nextVersion }}-SNAPSHOT"
77
+ export NEW_VERSION="999-SNAPSHOT"
111
78
.github/scripts/change_versions.sh
112
- git commit -am "chore: switch to version $NEW_VERSION"
113
- git push origin ${{ github.event.inputs.releaseBranch }}-bump2
114
- gh pr create --reviewer triceo,ge0ffrey --base ${{ github.event.inputs.developmentBranch }} --head ${{ github.event.inputs.releaseBranch }}-bump2 --title "chore: move to ${{ github.event.inputs.nextVersion }}-SNAPSHOT" --body-file .github/workflows/release-pr-body-development.md
115
- env :
116
- GITHUB_TOKEN : ${{ secrets.JRELEASER_GITHUB_TOKEN }}
79
+ git commit -am "build: move back to version $NEW_VERSION"
80
+ git push origin ${{ github.event.inputs.releaseBranch }}
0 commit comments