-
Notifications
You must be signed in to change notification settings - Fork 199
78 lines (68 loc) · 2.16 KB
/
deploy_release.yml
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
name: Build, Test and Release | Stable version
on:
push:
branches:
release
permissions:
id-token: write
contents: write
actions: write
jobs:
build-amplify-swift:
name: Build Amplify package
uses: ./.github/workflows/build_amplify_swift_platforms.yml
with:
identifier: 'workflow-call-build-amplify-swift'
unit-tests:
name: Run Plugins Unit Tests
uses: ./.github/workflows/unit_test.yml
with:
identifier: 'workflow-call-unit-test'
secrets: inherit
fortify:
name: Run Fortify Scan
uses: ./.github/workflows/fortify_scan.yml
secrets: inherit
with:
identifier: 'workflow-call-fortify'
release:
environment: Release
name: Release new release version
needs: [unit-tests, fortify, build-amplify-swift]
runs-on: macos-latest
env:
GITHUB_EMAIL: aws-amplify-ops@amazon.com
GITHUB_USER: aws-amplify-ops
steps:
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }}
role-session-name: ${{ format('{0}.release', github.run_id) }}
aws-region: ${{ secrets.AWS_REGION }}
- id: retrieve-token
name: Retrieve Token
env:
DEPLOY_SECRET_ARN: ${{ secrets.DEPLOY_SECRET_ARN }}
run: |
PAT=$(aws secretsmanager get-secret-value \
--secret-id "$DEPLOY_SECRET_ARN" \
| jq -r ".SecretString | fromjson | .Credential")
echo "token=$PAT" >> $GITHUB_OUTPUT
- name: Checkout repo
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 #v4.1.1
with:
fetch-depth: 100
token: ${{steps.retrieve-token.outputs.token}}
- name: Setup Ruby
uses: ruby/setup-ruby@22fdc77bf4148f810455b226c90fb81b5cbc00a7 # v1.171.0
with:
ruby-version: '3.2.1'
bundler-cache: true
- name: Release Package
run: bundle exec fastlane release
- name: Release docs
working-directory: ${{ github.workspace }}
run: |
git checkout -B gh-pages
bash ./CircleciScripts/jazzy_doc_gen.sh