File tree Expand file tree Collapse file tree 1 file changed +13
-8
lines changed Expand file tree Collapse file tree 1 file changed +13
-8
lines changed Original file line number Diff line number Diff line change 1111 ARTIFACT_PREFIX : dist-
1212 # See: https://github.com/actions/setup-go/tree/main#supported-version-syntax
1313 GO_VERSION : " 1.17"
14+ AWS_REGION : " us-east-1"
1415
1516on :
1617 push :
@@ -197,7 +198,11 @@ jobs:
197198
198199 create-release :
199200 runs-on : ubuntu-latest
201+ environment : production
200202 needs : notarize-macos
203+ permissions :
204+ contents : write
205+ id-token : write # This is required for requesting the JWT
201206
202207 steps :
203208 - name : Download artifact
@@ -233,12 +238,12 @@ jobs:
233238 # (all the files we need are in the DIST_DIR root)
234239 artifacts : ${{ env.DIST_DIR }}/*
235240
241+ - name : configure aws credentials
242+ uses : aws-actions/configure-aws-credentials@v4
243+ with :
244+ role-to-assume : ${{ secrets.AWS_ROLE_TO_ASSUME }}
245+ role-session-name : " github_${{ env.PROJECT_NAME }}"
246+ aws-region : ${{ env.AWS_REGION }}
247+
236248 - name : Upload release files on Arduino downloads servers
237- uses : docker://plugins/s3
238- env :
239- PLUGIN_SOURCE : " ${{ env.DIST_DIR }}/*"
240- PLUGIN_TARGET : ${{ env.AWS_PLUGIN_TARGET }}
241- PLUGIN_STRIP_PREFIX : " ${{ env.DIST_DIR }}/"
242- PLUGIN_BUCKET : ${{ secrets.DOWNLOADS_BUCKET }}
243- AWS_ACCESS_KEY_ID : ${{ secrets.AWS_ACCESS_KEY_ID }}
244- AWS_SECRET_ACCESS_KEY : ${{ secrets.AWS_SECRET_ACCESS_KEY }}
249+ run : aws s3 sync ${{ env.DIST_DIR }} s3://${{ secrets.DOWNLOADS_BUCKET }}${{ env.AWS_PLUGIN_TARGET }}
You can’t perform that action at this time.
0 commit comments