File tree 1 file changed +13
-8
lines changed
1 file changed +13
-8
lines changed Original file line number Diff line number Diff line change 11
11
ARTIFACT_PREFIX : dist-
12
12
# See: https://github.com/actions/setup-go/tree/main#supported-version-syntax
13
13
GO_VERSION : " 1.17"
14
+ AWS_REGION : " us-east-1"
14
15
15
16
on :
16
17
push :
@@ -197,7 +198,11 @@ jobs:
197
198
198
199
create-release :
199
200
runs-on : ubuntu-latest
201
+ environment : production
200
202
needs : notarize-macos
203
+ permissions :
204
+ contents : write
205
+ id-token : write # This is required for requesting the JWT
201
206
202
207
steps :
203
208
- name : Download artifact
@@ -233,12 +238,12 @@ jobs:
233
238
# (all the files we need are in the DIST_DIR root)
234
239
artifacts : ${{ env.DIST_DIR }}/*
235
240
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
+
236
248
- 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