From 298acb486ef3d1adc06937b5069a5ff2b7854b6c Mon Sep 17 00:00:00 2001 From: Josh Cummings <3627351+jzheaux@users.noreply.github.com> Date: Wed, 25 Mar 2026 17:29:31 -0600 Subject: [PATCH 1/5] Use compute-version in spring-artifactory-gradle-build Signed-off-by: Josh Cummings <3627351+jzheaux@users.noreply.github.com> --- .github/actions/spring-artifactory-gradle-build/action.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/actions/spring-artifactory-gradle-build/action.yml b/.github/actions/spring-artifactory-gradle-build/action.yml index 6c09281..a3e3104 100644 --- a/.github/actions/spring-artifactory-gradle-build/action.yml +++ b/.github/actions/spring-artifactory-gradle-build/action.yml @@ -54,6 +54,10 @@ runs: with: java-version: 24 + - name: Compute Version + id: compute-version + uses: spring-io/spring-release-actions/compute-version@0.0.3 + - name: Set Release Version if: inputs.releaseVersion shell: bash @@ -85,7 +89,7 @@ runs: branchVersion=${{ github.ref_name }} if [ $branchVersion = 'main' ]; then - snapshotVersion=$(cat gradle.properties | sed -n '/^version=/ { s/^version=//;p }') + snapshotVersion=${{ steps.compute-version.outputs.version }} branchVersion=${snapshotVersion%.*}.x fi From ba3d43b27671519e695892119b846a229bdca69e Mon Sep 17 00:00:00 2001 From: Josh Cummings <3627351+jzheaux@users.noreply.github.com> Date: Wed, 25 Mar 2026 17:45:18 -0600 Subject: [PATCH 2/5] Use compute-version in spring-artifactory-maven-release-staging Signed-off-by: Josh Cummings <3627351+jzheaux@users.noreply.github.com> --- .../workflows/spring-artifactory-maven-release-staging.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/spring-artifactory-maven-release-staging.yml b/.github/workflows/spring-artifactory-maven-release-staging.yml index dfc1cb2..7818a98 100644 --- a/.github/workflows/spring-artifactory-maven-release-staging.yml +++ b/.github/workflows/spring-artifactory-maven-release-staging.yml @@ -76,13 +76,17 @@ jobs: java-version: 24 cache: maven + - name: Compute Version + id: compute-version + uses: spring-io/spring-release-actions/compute-version@0.0.3 + - name: Evaluate Build Name id: build-name run: | branchVersion=${{ github.ref_name }} if [ $branchVersion = 'main' ]; then - snapshotVersion=$(mvn help:evaluate -Dexpression="project.version" -q -DforceStdout) + snapshotVersion=${{ steps.compute-version.outputs.version }} branchVersion=${snapshotVersion%.*}.x fi From 88bdd6732d431699b4eaf28d293ca51600d73a93 Mon Sep 17 00:00:00 2001 From: Josh Cummings <3627351+jzheaux@users.noreply.github.com> Date: Thu, 26 Mar 2026 09:31:12 -0600 Subject: [PATCH 3/5] Use compute-version in spring-artifactory-maven-snapshot Signed-off-by: Josh Cummings <3627351+jzheaux@users.noreply.github.com> --- .github/workflows/spring-artifactory-maven-snapshot.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/spring-artifactory-maven-snapshot.yml b/.github/workflows/spring-artifactory-maven-snapshot.yml index fe452aa..30b4a9e 100644 --- a/.github/workflows/spring-artifactory-maven-snapshot.yml +++ b/.github/workflows/spring-artifactory-maven-snapshot.yml @@ -59,6 +59,10 @@ jobs: java-version: 24 cache: maven + - name: Compute Version + id: compute-version + uses: spring-io/spring-release-actions/compute-version@0.0.3 + - name: Build and Deploy run: ./mvnw -B -ntp -DaltDeploymentRepository=local::file:deployment-repository ${{ inputs.mavenArgs }} deploy @@ -70,7 +74,7 @@ jobs: branchVersion=${{ github.ref_name }} if [ $branchVersion = 'main' ]; then - snapshotVersion=$(mvn help:evaluate -Dexpression="project.version" -q -DforceStdout) + snapshotVersion=${{ steps.compute-version.outputs.version }} branchVersion=${snapshotVersion%.*}.x fi From e25e9e414dab6587586b1f0d8a6cbd01ed5b7325 Mon Sep 17 00:00:00 2001 From: Josh Cummings <3627351+jzheaux@users.noreply.github.com> Date: Thu, 26 Mar 2026 09:44:58 -0600 Subject: [PATCH 4/5] Use compute-next-snapshot in spring-finalize-release Signed-off-by: Josh Cummings <3627351+jzheaux@users.noreply.github.com> --- .github/workflows/spring-finalize-release.yml | 20 +++++++------------ 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/.github/workflows/spring-finalize-release.yml b/.github/workflows/spring-finalize-release.yml index 840aa4d..3ce175b 100644 --- a/.github/workflows/spring-finalize-release.yml +++ b/.github/workflows/spring-finalize-release.yml @@ -34,6 +34,12 @@ jobs: distribution: temurin java-version: 24 + - name: Compute Next Snapshot + id: next-snapshot + uses: spring-io/spring-release-actions/compute-next-snapshot@0.0.3 + with: + version: ${{ inputs.milestone }} + - name: Tag Release and Next Development Version id: tag-release run: | @@ -52,19 +58,7 @@ jobs: git commit -a -m "[CI/CD] Release version ${{ inputs.milestone }}" git tag "v${{ inputs.milestone }}" - NEXT_VERSION="${{ inputs.milestone }}" - - if [[ "$NEXT_VERSION" == *"-"* ]] - then - NEXT_VERSION=${NEXT_VERSION/-*} - else - MAJOR_MINOR=$(echo "$NEXT_VERSION" | cut -d '.' -f1-2) - PATCH=$(echo "$NEXT_VERSION" | cut -d '.' -f3) - PATCH=$((PATCH+1)) - NEXT_VERSION=$MAJOR_MINOR.$PATCH - fi - - NEXT_VERSION=${NEXT_VERSION}-SNAPSHOT + NEXT_VERSION="${{ steps.next-snapshot.outputs.version }}" if test -f pom.xml then From de031f65f23b80d192e3f3b557523970d22c9092 Mon Sep 17 00:00:00 2001 From: Josh Cummings <3627351+jzheaux@users.noreply.github.com> Date: Thu, 26 Mar 2026 09:49:24 -0600 Subject: [PATCH 5/5] Use compute-version in spring-scheduled-milestone-for-branch Signed-off-by: Josh Cummings <3627351+jzheaux@users.noreply.github.com> --- .../action.yml | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/.github/actions/spring-scheduled-milestone-for-branch/action.yml b/.github/actions/spring-scheduled-milestone-for-branch/action.yml index c2c59a2..c59f4fd 100644 --- a/.github/actions/spring-scheduled-milestone-for-branch/action.yml +++ b/.github/actions/spring-scheduled-milestone-for-branch/action.yml @@ -9,7 +9,7 @@ outputs: value: ${{ steps.find-milestone.outputs.milestone }} currentVersion: description: 'The version for Milestone to find' - value: ${{ steps.find-milestone.outputs.currentVersion }} + value: ${{ steps.compute-version.outputs.version }} runs: using: composite @@ -20,19 +20,16 @@ runs: distribution: temurin java-version: 25 + - name: Compute Version + id: compute-version + uses: spring-io/spring-release-actions/compute-version@0.0.3 + - name: Find Scheduled Milestone for Current Version in Branch id: find-milestone shell: bash run: | - if test -f pom.xml - then - CURRENT_VERSION=$(mvn help:evaluate -Dexpression="project.version" -q -DforceStdout) - else - CURRENT_VERSION=$(cat gradle.properties | sed -n '/^version=/ { s/^version=//;p }') - fi - - echo currentVersion=$CURRENT_VERSION >> $GITHUB_OUTPUT - + CURRENT_VERSION=${{ steps.compute-version.outputs.version }} + export CANDIDATE_VERSION=${CURRENT_VERSION/-SNAPSHOT} MILESTONE=$(gh api repos/$GITHUB_REPOSITORY/milestones --jq 'map(select(.due_on != null and (.title | startswith(env.CANDIDATE_VERSION)))) | .[0] | .title') @@ -41,4 +38,4 @@ runs: echo "::warning title=No scheduled milestone::No scheduled milestone for $CURRENT_VERSION version" else echo milestone=$MILESTONE >> $GITHUB_OUTPUT - fi \ No newline at end of file + fi