File tree Expand file tree Collapse file tree 2 files changed +19
-6
lines changed Expand file tree Collapse file tree 2 files changed +19
-6
lines changed Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ version=$( npm pkg get version | sed ' s/"//g' )
4+ bucket=$1
5+
6+ aws s3api put-object --bucket $bucket --key " content/$version /cwr.js" --body build/assets/cwr.js
7+ aws s3api put-object --bucket $bucket --key " content/$version /LICENSE-THIRD-PARTY" --body LICENSE-THIRD-PARTY
8+
9+ if [[ $version =~ ^[0-9]+\. [0-9]+\. [0-9]+$ ]]
10+ then
11+ minorUpdate=$( echo $version | sed -En " s/^([0-9]+\.)[0-9]+\.[0-9]+/\1x/p" )
12+ aws s3api put-object --bucket $bucket --key " content/$minorUpdate /cwr.js" --body build/assets/cwr.js
13+ aws s3api put-object --bucket $bucket --key " content/$minorUpdate /LICENSE-THIRD-PARTY" --body LICENSE-THIRD-PARTY
14+ patchUpdate=$( echo $version | sed -En " s/^([0-9]+\.[0-9]+\.)[0-9]+/\1x/p" )
15+ aws s3api put-object --bucket $bucket --key " content/$patchUpdate /cwr.js" --body build/assets/cwr.js
16+ aws s3api put-object --bucket $bucket --key " content/$patchUpdate /LICENSE-THIRD-PARTY" --body LICENSE-THIRD-PARTY
17+ fi
Original file line number Diff line number Diff line change @@ -2,10 +2,6 @@ name: AWS RUM Web Client Release
22
33on :
44 workflow_dispatch :
5- inputs :
6- version :
7- description : The version to tag the release with, e.g., 1.2.0, 1.2.1-alpha.1
8- required : true
95
106jobs :
117 publish_to_cdn :
5046
5147 - name : Publish to CloudWatch RUM CDN
5248 run : |
53- aws s3api put-object --bucket ${{ secrets.BUCKET }} --key 'content/${{ github.event.inputs.version }}/cwr.js' --body build/assets/cwr.js
54- aws s3api put-object --bucket ${{ secrets.BUCKET }} --key 'content/${{ github.event.inputs.version }}/LICENSE-THIRD-PARTY' --body LICENSE-THIRD-PARTY
49+ chmod u+x . github/scripts/deploy.sh
50+ .github/scripts/deploy.sh ${{ secrets.BUCKET }}
5551
5652 - name : Publish to NPM
5753 run : npm publish
You can’t perform that action at this time.
0 commit comments