From 6394d68b4da93c038b312fd7839906a6dc8f72ae Mon Sep 17 00:00:00 2001 From: "Visser, M (Martin)" Date: Tue, 5 May 2026 11:23:50 +0200 Subject: [PATCH 1/3] Fix build/release order (cherry picked from commit ca930e808174638c517d70feee693d351b8b9bc8) --- .github/workflows/actions/cd/action.yml | 52 +++++++++++++++++-------- 1 file changed, 35 insertions(+), 17 deletions(-) diff --git a/.github/workflows/actions/cd/action.yml b/.github/workflows/actions/cd/action.yml index 1801dac..6eacd83 100644 --- a/.github/workflows/actions/cd/action.yml +++ b/.github/workflows/actions/cd/action.yml @@ -30,6 +30,9 @@ inputs: runs: using: composite steps: + - name: Force JavaScript actions to Node 24 + shell: bash + run: echo "FORCE_JAVASCRIPT_ACTIONS_TO_NODE24=true" >> "$GITHUB_ENV" - name: Checkout uses: actions/checkout@v6.0.2 with: @@ -56,29 +59,44 @@ runs: MAVEN_USERNAME: ${{ inputs.server-username }} MAVEN_TOKEN: ${{ inputs.server-token }} MAVEN_GPG_PASSPHRASE: ${{ inputs.gpg-passphrase }} - - name: Set Release version env variable + - name: Commit & Push release version + shell: bash + run: | + git config user.email "${{ inputs.bot-mail }}" + git config user.name "skunkworks-rabot" + git add pom.xml + if git diff --cached --quiet; then + echo "::error::No release version change found in pom.xml" + exit 1 + fi + git commit -m "chore: release ${{ inputs.new-version }}" + git push "https://x-access-token:${{ inputs.version-push-pat }}@github.com/${{ github.repository }}.git" "HEAD:${{ github.ref_name }}" + - name: Set release metadata env variables shell: bash run: | - echo "RELEASE_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_ENV + echo "RELEASE_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)" >> "$GITHUB_ENV" + echo "RELEASE_COMMIT_SHA=$(git rev-parse HEAD)" >> "$GITHUB_ENV" - name: Create Release - id: create_release - uses: actions/create-release@v1 + shell: bash env: - GITHUB_TOKEN: ${{ inputs.github-token }} - with: - tag_name: ${{ env.RELEASE_VERSION }} - release_name: Release ${{ env.RELEASE_VERSION }} - draft: true - prerelease: false + GH_TOKEN: ${{ inputs.github-token }} + run: | + gh release create "${RELEASE_VERSION}" \ + --title "Release ${RELEASE_VERSION}" \ + --target "${RELEASE_COMMIT_SHA}" \ + --draft - name: Prepare next release version shell: bash run: mvn build-helper:parse-version versions:set -DnewVersion=\${parsedVersion.majorVersion}.\${parsedVersion.minorVersion}.\${parsedVersion.nextIncrementalVersion}-SNAPSHOT versions:commit - - name: Commit & Push changes - uses: actions-js/push@master - with: - github_token: ${{ inputs.version-push-pat }} - author_email: ${{ inputs.bot-mail }} - author_name: skunkworks-rabot - branch: 'release/0.2.x' + - name: Commit & Push next snapshot version + shell: bash + run: | + git add pom.xml + if git diff --cached --quiet; then + echo "No changes to commit" + exit 0 + fi + git commit -m "chore: prepare next release version" + git push "https://x-access-token:${{ inputs.version-push-pat }}@github.com/${{ github.repository }}.git" "HEAD:${{ github.ref_name }}" - name: Maven Dependency Tree Dependency Submission uses: advanced-security/maven-dependency-submission-action@v5.0.0 From 50dfc1d83f691ceca265fb24a710670ee90f602a Mon Sep 17 00:00:00 2001 From: "Visser, M (Martin)" Date: Wed, 6 May 2026 11:10:55 +0200 Subject: [PATCH 2/3] Remove "chore" prefix (cherry picked from commit f1a9d8f5a76f359a186ab3b1e4d0d940855e3e39) --- .github/workflows/actions/cd/action.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/actions/cd/action.yml b/.github/workflows/actions/cd/action.yml index 6eacd83..ab16b9e 100644 --- a/.github/workflows/actions/cd/action.yml +++ b/.github/workflows/actions/cd/action.yml @@ -69,7 +69,7 @@ runs: echo "::error::No release version change found in pom.xml" exit 1 fi - git commit -m "chore: release ${{ inputs.new-version }}" + git commit -m "Release ${{ inputs.new-version }}" git push "https://x-access-token:${{ inputs.version-push-pat }}@github.com/${{ github.repository }}.git" "HEAD:${{ github.ref_name }}" - name: Set release metadata env variables shell: bash @@ -96,7 +96,7 @@ runs: echo "No changes to commit" exit 0 fi - git commit -m "chore: prepare next release version" + git commit -m "Prepare next release version" git push "https://x-access-token:${{ inputs.version-push-pat }}@github.com/${{ github.repository }}.git" "HEAD:${{ github.ref_name }}" - name: Maven Dependency Tree Dependency Submission uses: advanced-security/maven-dependency-submission-action@v5.0.0 From e74237841ab761984115baeedd3cde6cdb4ce2fc Mon Sep 17 00:00:00 2001 From: "Visser, M (Martin)" Date: Mon, 11 May 2026 08:43:49 +0200 Subject: [PATCH 3/3] fix: update release version command (cherry picked from commit b9e80ff441c2e3d79bd4d7de597fa2292f235b13) --- .github/workflows/actions/cd/action.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/actions/cd/action.yml b/.github/workflows/actions/cd/action.yml index ab16b9e..1202c84 100644 --- a/.github/workflows/actions/cd/action.yml +++ b/.github/workflows/actions/cd/action.yml @@ -69,7 +69,8 @@ runs: echo "::error::No release version change found in pom.xml" exit 1 fi - git commit -m "Release ${{ inputs.new-version }}" + RELEASE_VERSION="$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)" + git commit -m "Release ${RELEASE_VERSION}" git push "https://x-access-token:${{ inputs.version-push-pat }}@github.com/${{ github.repository }}.git" "HEAD:${{ github.ref_name }}" - name: Set release metadata env variables shell: bash