@@ -58,18 +58,15 @@ jobs:
5858 token : ${{ secrets.GH_ACTIONS_REPO_TOKEN }}
5959 - name : Set up JDK 17
6060 uses : spring-io/spring-gradle-build-action@v2
61- - id : project-version
62- name : Extract Project Version
63- run : echo "version=$(cat gradle.properties | grep 'version=' | awk -F'=' '{print $2}')" >> $GITHUB_OUTPUT
6461 - id : next-snapshot-version
6562 name : Calculate Next Snapshot Version
6663 env :
67- VERSION : ${{ steps .project-version.outputs. version }}
64+ VERSION : ${{ inputs .project-version }}
6865 run : echo "version=$(./gradlew -q getNextSnapshotVersion -PcurrentVersion=$VERSION)" >> $GITHUB_OUTPUT
6966 - id : previous-release-milestone
7067 name : Get Previous Release Milestone
7168 env :
72- VERSION : ${{ steps .project-version.outputs. version }}
69+ VERSION : ${{ inputs .project-version }}
7370 run : echo "version=$(./gradlew -q getPreviousReleaseMilestone -PcurrentVersion=$VERSION -PgitHubAccessToken=$TOKEN)" >> $GITHUB_OUTPUT
7471 - id : previous-snapshot-version
7572 name : Get Previous Snapshot Version
8582 name : Check OSS Support (for current branch)
8683 run : echo "result=$(./gradlew -q checkBranchHasOssSupport -Pbranch=$BRANCH -PgitHubAccessToken=$TOKEN)" >> $GITHUB_OUTPUT
8784 - name : Wait for Milestone Artifacts
88- if : ${{ contains(steps .project-version.outputs.version , '-RC') || contains(steps .project-version.outputs. version, '-M') }}
85+ if : ${{ contains(inputs .project-version, '-RC') || contains(inputs .project-version, '-M') }}
8986 env :
90- VERSION : ${{ steps .project-version.outputs. version }}
87+ VERSION : ${{ inputs .project-version }}
9188 run : |
9289 echo "Wait for artifacts of $REPO@$VERSION to appear on milestone repository ($MILESTONE_REPO)."
9390 until curl -f -s $MILESTONE_REPO/$ARTIFACT_PATH/$VERSION/ > /dev/null
9794 done
9895 echo "Artifacts for $REPO@$VERSION have been released to milestone repository ($MILESTONE_REPO)."
9996 - name : Wait for Release Artifacts
100- if : ${{ !contains(steps .project-version.outputs.version , '-RC') && !contains(steps .project-version.outputs. version, '-M') }}
97+ if : ${{ !contains(inputs .project-version, '-RC') && !contains(inputs .project-version, '-M') }}
10198 env :
102- VERSION : ${{ steps .project-version.outputs. version }}
99+ VERSION : ${{ inputs .project-version }}
103100 run : |
104101 echo "Wait for artifacts of $REPO@$VERSION to appear on release repository ($RELEASE_REPO)."
105102 until curl -f -s $RELEASE_REPO/$ARTIFACT_PATH/$VERSION/ > /dev/null
@@ -110,7 +107,7 @@ jobs:
110107 echo "Artifacts for $REPO@$VERSION have been released to release repository ($RELEASE_REPO)."
111108 - name : Create GitHub Release
112109 env :
113- VERSION : ${{ steps .project-version.outputs. version }}
110+ VERSION : ${{ inputs .project-version }}
114111 run : ./gradlew createGitHubRelease -PnextVersion=$VERSION -Pbranch=$BRANCH -PcreateRelease=true -PgitHubAccessToken=$TOKEN
115112 - name : Update Version
116113 env :
@@ -123,7 +120,7 @@ jobs:
123120 git push
124121 - name : Announce Release on GChat
125122 env :
126- VERSION : ${{ steps .project-version.outputs. version }}
123+ VERSION : ${{ inputs .project-version }}
127124 ANNOUNCING_ID : ${{ inputs.slack-announcing-id }}
128125 WEBHOOK_URL : ${{ secrets.SPRING_RELEASE_GCHAT_WEBHOOK_URL }}
129126 run : |
@@ -135,11 +132,11 @@ jobs:
135132 run : ./gradlew deleteSaganRelease -PpreviousVersion="$VERSION" -PgitHubAccessToken="$TOKEN"
136133 - name : Create Released Version
137134 env :
138- VERSION : ${{ steps .project-version.outputs. version }}
135+ VERSION : ${{ inputs .project-version }}
139136 run : ./gradlew createSaganRelease -PnextVersion="$VERSION" -PgitHubAccessToken="$TOKEN"
140137 - name : Close Release Milestone
141138 env :
142- VERSION : ${{ steps .project-version.outputs. version }}
139+ VERSION : ${{ inputs .project-version }}
143140 run : ./gradlew closeMilestone -PnextVersion="$VERSION" -PgitHubAccessToken="$TOKEN"
144141 - name : Delete Previous Snapshot Version
145142 if : ${{ steps.previous-snapshot-version.outputs.version != '' }}
0 commit comments