1111 description : Comma separated list of commit shas to cherrypick
1212
1313env :
14+ VERSION : ${{ env.VERSION }}
15+ COMMITS : ${{ env.COMMITS }}
1416 AWS_DEFAULT_REGION : us-east-1
1517
1618permissions :
2931 name : Parse release branch name
3032 run : |
3133 # Sets the release-branch-name output to the version number with the last non-period element replaced with an 'x' and preprended with v.
32- echo "release-branch-name=$(echo '${{ github.event.inputs.version }}' | sed -E 's/([^.]+)\.([^.]+)\.([^.]+)/v\1.\2.x/')" >> $GITHUB_OUTPUT
34+ echo "release-branch-name=$(echo '${{ env.VERSION }}' | sed -E 's/([^.]+)\.([^.]+)\.([^.]+)/v\1.\2.x/')" >> $GITHUB_OUTPUT
3335 # Sets the release-tag-name output to the version number with the last non-period element replace with a '0' and prepended with v
34- echo "release-tag-name=$(echo '${{ github.event.inputs.version }}' | sed -E 's/([^.]+)\.([^.]+)\.([^.]+)/v\1.\2.0/')" >> $GITHUB_OUTPUT
36+ echo "release-tag-name=$(echo '${{ env.VERSION }}' | sed -E 's/([^.]+)\.([^.]+)\.([^.]+)/v\1.\2.0/')" >> $GITHUB_OUTPUT
3537 - id : checkout-release-branch
3638 name : Check out release branch
3739 # Will fail if there is no release branch yet or succeed otherwise
@@ -82,20 +84,20 @@ jobs:
8284 if : ${{ github.event.inputs.commits != '' }}
8385 run : |
8486 git fetch origin main
85- echo ${{ github.event.inputs.commits }} | sed -n 1'p' | tr ',' '\n' | while read word; do
87+ echo ${{ env.COMMITS }} | sed -n 1'p' | tr ',' '\n' | while read word; do
8688 # Trim whitespaces and cherrypick
8789 echo $word | sed 's/ *$//g' | sed 's/^ *//g' | git cherry-pick --stdin
8890 done
8991
9092 - name : Build release with Gradle
9193 uses : gradle/gradle-build-action@v2
9294 with :
93- arguments : build jib final closeAndReleaseSonatypeStagingRepository -Prelease.version=${{ github.event.inputs.version }} --stacktrace
95+ arguments : build jib final closeAndReleaseSonatypeStagingRepository -Prelease.version=${{ env.VERSION }} --stacktrace
9496 env :
9597 PUBLISH_USERNAME : ${{ secrets.PUBLISH_USERNAME }}
9698 PUBLISH_PASSWORD : ${{ secrets.PUBLISH_PASSWORD }}
9799 GRGIT_USER : ${{ secrets.GITHUB_TOKEN }}
98- COMMIT_HASH : ${{ github.event.inputs.version }}
100+ COMMIT_HASH : ${{ env.VERSION }}
99101 GPG_PRIVATE_KEY : ${{ secrets.GPG_PRIVATE_KEY }}
100102 GPG_PASSPHRASE : ${{ secrets.GPG_PASSPHRASE }}
101103
@@ -105,8 +107,8 @@ jobs:
105107 env :
106108 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
107109 with :
108- tag_name : v${{ github.event.inputs.version }}
109- release_name : Release v${{ github.event.inputs.version }}
110+ tag_name : v${{ env.VERSION }}
111+ release_name : Release v${{ env.VERSION }}
110112 draft : true
111113 prerelease : false
112114
@@ -117,6 +119,6 @@ jobs:
117119 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
118120 with :
119121 upload_url : ${{ steps.create_release.outputs.upload_url }}
120- asset_path : otelagent/build/libs/aws-opentelemetry-agent-${{ github.event.inputs.version }}.jar
122+ asset_path : otelagent/build/libs/aws-opentelemetry-agent-${{ env.VERSION }}.jar
121123 asset_name : aws-opentelemetry-agent.jar
122124 asset_content_type : application/java-archive
0 commit comments