Skip to content

Commit ec911fe

Browse files
authored
chore: kickoff release
2 parents 2b72844 + 1ee79bc commit ec911fe

File tree

2 files changed

+120
-7
lines changed

2 files changed

+120
-7
lines changed

.github/workflows/deploy_release.yml

Lines changed: 62 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,68 @@ permissions:
1010
actions: write
1111

1212
jobs:
13-
release-stable:
14-
uses: ./.github/workflows/deploy_package.yml
13+
build-amplify-swift:
14+
name: Build Amplify package
15+
uses: ./.github/workflows/build_amplify_swift_platforms.yml
1516
with:
16-
type: release
17+
identifier: 'workflow-call-build-amplify-swift'
18+
19+
unit-tests:
20+
name: Run Plugins Unit Tests
21+
uses: ./.github/workflows/unit_test.yml
22+
with:
23+
identifier: 'workflow-call-unit-test'
24+
25+
fortify:
26+
name: Run Fortify Scan
27+
uses: ./.github/workflows/fortify_scan.yml
1728
secrets: inherit
29+
with:
30+
identifier: 'workflow-call-fortify'
31+
32+
release:
33+
environment: Release
34+
name: Release new release version
35+
needs: [unit-tests, fortify, build-amplify-swift]
36+
runs-on: macos-latest
37+
env:
38+
GITHUB_EMAIL: [email protected]
39+
GITHUB_USER: aws-amplify-ops
40+
steps:
41+
- name: Configure AWS credentials
42+
uses: aws-actions/configure-aws-credentials@5fd3084fc36e372ff1fff382a39b10d03659f355 #v2
43+
with:
44+
role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }}
45+
role-session-name: ${{ format('{0}.release', github.run_id) }}
46+
aws-region: ${{ secrets.AWS_REGION }}
47+
48+
- id: retrieve-token
49+
name: Retrieve Token
50+
env:
51+
DEPLOY_SECRET_ARN: ${{ secrets.DEPLOY_SECRET_ARN }}
52+
run: |
53+
PAT=$(aws secretsmanager get-secret-value \
54+
--secret-id "$DEPLOY_SECRET_ARN" \
55+
| jq -r ".SecretString | fromjson | .Credential")
56+
echo "token=$PAT" >> $GITHUB_OUTPUT
57+
58+
- name: Checkout repo
59+
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
60+
with:
61+
fetch-depth: 100
62+
token: ${{steps.retrieve-token.outputs.token}}
63+
64+
- name: Setup Ruby
65+
uses: ruby/setup-ruby@250fcd6a742febb1123a77a841497ccaa8b9e939 # v1.152.0
66+
with:
67+
ruby-version: '3.2.1'
68+
bundler-cache: true
69+
70+
- name: Release Package
71+
run: bundle exec fastlane release
1872

73+
- name: Release docs
74+
working-directory: ${{ github.workspace }}
75+
run: |
76+
git checkout -B gh-pages
77+
bash ./CircleciScripts/jazzy_doc_gen.sh

.github/workflows/deploy_unstable.yml

Lines changed: 58 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,62 @@ permissions:
1010
actions: write
1111

1212
jobs:
13-
release-unstable:
14-
uses: ./.github/workflows/deploy_package.yml
13+
build-amplify-swift:
14+
name: Build Amplify package
15+
uses: ./.github/workflows/build_amplify_swift_platforms.yml
1516
with:
16-
type: unstable
17-
secrets: inherit
17+
identifier: 'workflow-call-build-amplify-swift'
18+
19+
unit-tests:
20+
name: Run Plugins Unit Tests
21+
uses: ./.github/workflows/unit_test.yml
22+
with:
23+
identifier: 'workflow-call-unit-test'
24+
25+
fortify:
26+
name: Run Fortify Scan
27+
uses: ./.github/workflows/fortify_scan.yml
28+
secrets: inherit
29+
with:
30+
identifier: 'workflow-call-fortify'
31+
32+
release:
33+
environment: Release
34+
name: Release new unstable version
35+
needs: [unit-tests, fortify, build-amplify-swift]
36+
runs-on: macos-latest
37+
env:
38+
GITHUB_EMAIL: [email protected]
39+
GITHUB_USER: aws-amplify-ops
40+
steps:
41+
- name: Configure AWS credentials
42+
uses: aws-actions/configure-aws-credentials@5fd3084fc36e372ff1fff382a39b10d03659f355 #v2
43+
with:
44+
role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }}
45+
role-session-name: ${{ format('{0}.release', github.run_id) }}
46+
aws-region: ${{ secrets.AWS_REGION }}
47+
48+
- id: retrieve-token
49+
name: Retrieve Token
50+
env:
51+
DEPLOY_SECRET_ARN: ${{ secrets.DEPLOY_SECRET_ARN }}
52+
run: |
53+
PAT=$(aws secretsmanager get-secret-value \
54+
--secret-id "$DEPLOY_SECRET_ARN" \
55+
| jq -r ".SecretString | fromjson | .Credential")
56+
echo "token=$PAT" >> $GITHUB_OUTPUT
57+
58+
- name: Checkout repo
59+
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
60+
with:
61+
fetch-depth: 100
62+
token: ${{steps.retrieve-token.outputs.token}}
63+
64+
- name: Setup Ruby
65+
uses: ruby/setup-ruby@250fcd6a742febb1123a77a841497ccaa8b9e939 # v1.152.0
66+
with:
67+
ruby-version: '3.2.1'
68+
bundler-cache: true
69+
70+
- name: Release Package
71+
run: bundle exec fastlane unstable

0 commit comments

Comments
 (0)