File tree Expand file tree Collapse file tree 2 files changed +12
-6
lines changed Expand file tree Collapse file tree 2 files changed +12
-6
lines changed Original file line number Diff line number Diff line change @@ -59,11 +59,11 @@ jobs:
5959 role-to-assume : ${{ secrets.PUBLISHING_ROLE_ARN }}
6060 aws-region : us-west-2
6161
62- - name : Run release
63- env :
64- RELEASE_BUCKET : ${{ secrets.RELEASE_BUCKET }}
65- run : |
66- ./scripts/release.sh
62+ - name : Run CodeBuild
63+ uses : aws-actions/aws-codebuild-run-build@v1
64+ with :
65+ project-name : publish-aws-kotlin-repo-tools
66+ source-version-override : ${{ steps.resolve-version.outputs.NEW_VERSION }}
6767
6868 - name : Delete failed release tag
6969 if : ${{ failure() }}
Original file line number Diff line number Diff line change 11#! /bin/bash
22
33[ -z " $RELEASE_BUCKET " ] && { echo " RELEASE_BUCKET environment variable not set" ; exit 1; }
4+ [ -z " $PUBLISHING_ROLE_ARN " ] && { echo " PUBLISHING_ROLE_ARN environment variable not set" ; exit 1; }
45
56VERSION=$( git describe --tags --abbrev=0)
67HEAD_COMMIT=$( git rev-parse HEAD)
1314
1415echo " most recent tag: $VERSION (sha=$VERSION_COMMIT )"
1516
17+ SESSION_CREDS=$( aws sts assume-role --role-arn $PUBLISHING_ROLE_ARN --role-session-name publish-aws-kotlin-repo-tools)
18+ export AWS_ACCESS_KEY_ID=$( echo " ${SESSION_CREDS} " | jq -r ' .Credentials.AccessKeyId' )
19+ export AWS_SECRET_ACCESS_KEY=$( echo " ${SESSION_CREDS} " | jq -r ' .Credentials.SecretAccessKey' )
20+ export AWS_SESSION_TOKEN=$( echo " ${SESSION_CREDS} " | jq -r ' .Credentials.SessionToken' )
1621export RELEASE_S3_URL=" s3://$RELEASE_BUCKET /releases"
1722
1823TEST_KEY=" releases/aws/sdk/kotlin/gradle/build-support/$VERSION /build-support-$VERSION .jar"
@@ -23,7 +28,8 @@ if aws s3api head-object --bucket $RELEASE_BUCKET --key $TEST_KEY; then
2328fi
2429
2530echo " releasing version $VERSION "
31+ exit 1
2632
27- ./gradlew -Prelease.version=$VERSION publishAllPublicationsToReleaseRepository
33+ # ./gradlew -Prelease.version=$VERSION publishAllPublicationsToReleaseRepository
2834
2935
You can’t perform that action at this time.
0 commit comments