-
Notifications
You must be signed in to change notification settings - Fork 358
49 lines (45 loc) · 1.67 KB
/
Copy pathcli-post-release.yml
File metadata and controls
49 lines (45 loc) · 1.67 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
name: cli-post-release
# Finalize and announce the release once its been published on Github.
on:
release:
types: [released]
permissions:
contents: write
pull-requests: read
id-token: write # Needed for aws-actions/configure-aws-credentials@v6
jobs:
# Make sure the cli-release workflow that built this tag actually succeeded
# before we promote it to stable. The `released` event can fire even when
# cli-release failed partway (or a release was published by other means), so
# guard against finalizing a broken release.
check-release:
permissions:
actions: read
contents: read
runs-on: ubuntu-latest
steps:
# The `released` event can fire before the cli-release run has finished,
# so wait for it to complete. The action exits with failure if the waited
# workflow failed, which blocks the publish job below.
- name: Wait for cli-release to succeed for this tag
uses: int128/wait-for-workflows-action@v1.76.0
with:
sha: ${{ github.sha }}
# cli-release is triggered by the tag push, not the release event.
filter-workflow-events: push
filter-workflow-names: cli-release
publish:
runs-on: ubuntu-latest
environment: release
needs: check-release
steps:
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v6
with:
role-to-assume: ${{ secrets.AWS_ROLE }}
aws-region: us-west-2
- name: Update latest version in s3
run: |
tmp_file=$(mktemp)
echo "${{ github.ref_name }}" > $tmp_file
aws s3 cp $tmp_file s3://releases.jetpack.io/devbox/stable/version