Skip to content

Commit de031f6

Browse files
committed
Use compute-version in spring-scheduled-milestone-for-branch
Signed-off-by: Josh Cummings <3627351+jzheaux@users.noreply.github.com>
1 parent e25e9e4 commit de031f6

1 file changed

Lines changed: 8 additions & 11 deletions

File tree

  • .github/actions/spring-scheduled-milestone-for-branch

.github/actions/spring-scheduled-milestone-for-branch/action.yml

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ outputs:
99
value: ${{ steps.find-milestone.outputs.milestone }}
1010
currentVersion:
1111
description: 'The version for Milestone to find'
12-
value: ${{ steps.find-milestone.outputs.currentVersion }}
12+
value: ${{ steps.compute-version.outputs.version }}
1313

1414
runs:
1515
using: composite
@@ -20,19 +20,16 @@ runs:
2020
distribution: temurin
2121
java-version: 25
2222

23+
- name: Compute Version
24+
id: compute-version
25+
uses: spring-io/spring-release-actions/compute-version@0.0.3
26+
2327
- name: Find Scheduled Milestone for Current Version in Branch
2428
id: find-milestone
2529
shell: bash
2630
run: |
27-
if test -f pom.xml
28-
then
29-
CURRENT_VERSION=$(mvn help:evaluate -Dexpression="project.version" -q -DforceStdout)
30-
else
31-
CURRENT_VERSION=$(cat gradle.properties | sed -n '/^version=/ { s/^version=//;p }')
32-
fi
33-
34-
echo currentVersion=$CURRENT_VERSION >> $GITHUB_OUTPUT
35-
31+
CURRENT_VERSION=${{ steps.compute-version.outputs.version }}
32+
3633
export CANDIDATE_VERSION=${CURRENT_VERSION/-SNAPSHOT}
3734
MILESTONE=$(gh api repos/$GITHUB_REPOSITORY/milestones --jq 'map(select(.due_on != null and (.title | startswith(env.CANDIDATE_VERSION)))) | .[0] | .title')
3835

@@ -41,4 +38,4 @@ runs:
4138
echo "::warning title=No scheduled milestone::No scheduled milestone for $CURRENT_VERSION version"
4239
else
4340
echo milestone=$MILESTONE >> $GITHUB_OUTPUT
44-
fi
41+
fi

0 commit comments

Comments
 (0)