Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: kickoff release #3360

Merged
merged 1 commit into from
Nov 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 62 additions & 3 deletions .github/workflows/deploy_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,68 @@ permissions:
actions: write

jobs:
release-stable:
uses: ./.github/workflows/deploy_package.yml
build-amplify-swift:
name: Build Amplify package
uses: ./.github/workflows/build_amplify_swift_platforms.yml
with:
type: release
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'

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: [email protected]
GITHUB_USER: aws-amplify-ops
steps:
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@5fd3084fc36e372ff1fff382a39b10d03659f355 #v2
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@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
with:
fetch-depth: 100
token: ${{steps.retrieve-token.outputs.token}}

- name: Setup Ruby
uses: ruby/setup-ruby@250fcd6a742febb1123a77a841497ccaa8b9e939 # v1.152.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
62 changes: 58 additions & 4 deletions .github/workflows/deploy_unstable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,62 @@ permissions:
actions: write

jobs:
release-unstable:
uses: ./.github/workflows/deploy_package.yml
build-amplify-swift:
name: Build Amplify package
uses: ./.github/workflows/build_amplify_swift_platforms.yml
with:
type: unstable
secrets: inherit
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'

fortify:
name: Run Fortify Scan
uses: ./.github/workflows/fortify_scan.yml
secrets: inherit
with:
identifier: 'workflow-call-fortify'

release:
environment: Release
name: Release new unstable version
needs: [unit-tests, fortify, build-amplify-swift]
runs-on: macos-latest
env:
GITHUB_EMAIL: [email protected]
GITHUB_USER: aws-amplify-ops
steps:
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@5fd3084fc36e372ff1fff382a39b10d03659f355 #v2
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@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
with:
fetch-depth: 100
token: ${{steps.retrieve-token.outputs.token}}

- name: Setup Ruby
uses: ruby/setup-ruby@250fcd6a742febb1123a77a841497ccaa8b9e939 # v1.152.0
with:
ruby-version: '3.2.1'
bundler-cache: true

- name: Release Package
run: bundle exec fastlane unstable
Loading