1616 schedule :
1717 - cron : " 0 7 * * 1-5" # At 07:00 UTC (00:00 PST, 03:00 EST), Monday through Friday
1818
19+ permissions :
20+ id-token : write
21+ contents : read
22+
1923concurrency :
2024 group : release-manual-${{ github.ref }}
2125 cancel-in-progress : true
2731 update-release :
2832 runs-on : ubuntu-latest
2933 steps :
34+ - name : Set start timestamp
35+ id : start
36+ run : printf 'timestamp=%(%s)T\n' >> "$GITHUB_OUTPUT"
37+ - name : Configure AWS Credentials
38+ uses : aws-actions/configure-aws-credentials@v4
39+ with :
40+ role-to-assume : ${{ secrets.CI_AWS_ROLE_ARN }}
41+ aws-region : us-west-2
42+ - name : Setup kat
43+ uses : awslabs/aws-kotlin-repo-tools/.github/actions/setup-kat@main
3044 - uses : actions/checkout@v4
3145 with :
3246 ref : ' main'
4357 distribution : ' corretto'
4458 java-version : 17
4559 cache : ' gradle'
60+ - name : Configure Gradle
61+ uses : awslabs/aws-kotlin-repo-tools/.github/actions/configure-gradle@main
4662 - name : Check merge base
4763 shell : bash
4864 run : |
@@ -89,6 +105,10 @@ jobs:
89105 shell : bash
90106 run : |
91107 echo "merging main @ $main_sha into release @ $release_sha";
108+
109+ # Getting rid of the Gradle URL config changes caused by "Configure Gradle"
110+ git stash -- gradle/wrapper/gradle-wrapper.properties
111+
92112 git switch release;
93113 input_message=${{ inputs.commit_message }}
94114 message=${input_message:-"Merging main into release"}
@@ -101,3 +121,23 @@ jobs:
101121 echo "pushing changes to release branch";
102122 git push origin release;
103123 fi
124+ - name : Calculate duration
125+ id : end
126+ run : |
127+ printf -v now '%(%s)T'
128+ duration=$(( now - ${{ steps.start.outputs.timestamp }} ))
129+ echo "duration=$duration" >> "$GITHUB_OUTPUT"
130+ - name : Emit metrics
131+ if : always() # run this step even if previous steps failed or the job is canceled
132+ uses : awslabs/aws-kotlin-repo-tools/.github/actions/emit-metrics@main
133+ with :
134+ namespace : CI Metrics
135+ dimensions : |
136+ Product=aws-sdk-kotlin
137+ Trigger=${{ github.event_name == 'schedule' && 'schedule' || 'manual' }}
138+ metrics : |
139+ ReleaseMergeAttempted:1:Count
140+ ReleaseMergeSucceeded:${{ job.status == 'success' && '1' || '0' }}:Count
141+ ReleaseMergeCanceled:${{ job.status == 'cancelled' && '1' || '0' }}:Count
142+ ReleaseMergeFailed:${{ job.status == 'failure' && '1' || '0' }}:Count
143+ ReleaseMergeDuration:${{ steps.end.outputs.duration }}:Seconds
0 commit comments