File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -82,13 +82,19 @@ jobs:
8282 if : github.event_name == 'workflow_run'
8383 id : releasebranch
8484 run : |
85- echo "branch=$(cat releasebranch.txt)" >> "$GITHUB_OUTPUT"
85+ BRANCH=$(cat releasebranch.txt)
86+ echo "branch=$BRANCH" >> "$GITHUB_OUTPUT"
87+ # Derive release version and tag from branch (e.g. release/v2.0.5 -> 2.0.5, ref v2.0.5)
88+ # Checkout the tag so we publish the release version (2.0.5), not the branch tip (2.0.6-SNAPSHOT)
89+ VERSION="${BRANCH#release/v}"
90+ echo "version=$VERSION" >> "$GITHUB_OUTPUT"
91+ echo "ref=v$VERSION" >> "$GITHUB_OUTPUT"
8692 rm releasebranch.txt
8793
8894 - name : Checkout
8995 uses : actions/checkout@v5
9096 with :
91- ref : ${{ (github.event_name == 'workflow_run' && steps.releasebranch.outputs.branch ) || github.ref }}
97+ ref : ${{ (github.event_name == 'workflow_run' && steps.releasebranch.outputs.ref ) || github.ref }}
9298 fetch-depth : 0
9399
94100 - name : Set up Java 17
Original file line number Diff line number Diff line change 8787 - name : Bump to next development version
8888 run : |
8989 mvn -B release:update-versions -DgenerateBackupPoms=false
90+ mvn -B process-resources
9091 git add -A
9192 git commit -m "build(release): bump to next development version"
9293 git push origin "release/v${{ steps.version.outputs.version }}"
You can’t perform that action at this time.
0 commit comments