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_NAME : 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 :
7374
7475 create-release :
7576 runs-on : ubuntu-latest
77+ environment : production
7678 needs : create-release-artifacts
79+ permissions :
80+ contents : write
81+ id-token : write # This is required for requesting the JWT
7782
7883 steps :
7984 - name : Download artifact
@@ -108,12 +113,12 @@ jobs:
108113 # (all the files we need are in the DIST_DIR root)
109114 artifacts : ${{ env.DIST_DIR }}/*
110115
116+ - name : configure aws credentials
117+ uses : aws-actions/configure-aws-credentials@v4
118+ with :
119+ role-to-assume : ${{ secrets.AWS_ROLE_TO_ASSUME }}
120+ role-session-name : " github_${{ env.PROJECT_NAME }}"
121+ aws-region : ${{ env.AWS_REGION }}
122+
111123 - name : Upload release files on Arduino downloads servers
112- uses : docker://plugins/s3
113- env :
114- PLUGIN_SOURCE : " ${{ env.DIST_DIR }}/*"
115- PLUGIN_TARGET : ${{ env.AWS_PLUGIN_TARGET }}
116- PLUGIN_STRIP_PREFIX : " ${{ env.DIST_DIR }}/"
117- PLUGIN_BUCKET : ${{ secrets.DOWNLOADS_BUCKET }}
118- AWS_ACCESS_KEY_ID : ${{ secrets.AWS_ACCESS_KEY_ID }}
119- AWS_SECRET_ACCESS_KEY : ${{ secrets.AWS_SECRET_ACCESS_KEY }}
124+ 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