This repository has been archived by the owner on Apr 26, 2024. It is now read-only.
fix: test deployment #7
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release | |
on: | |
pull_request: | |
branches: | |
- main | |
types: | |
- closed | |
concurrency: | |
group: ${{ github.ref }}-${{ github.workflow }} | |
cancel-in-progress: true | |
jobs: | |
Deploy: | |
if: github.event.pull_request.merged == true && startsWith(github.head_ref, 'release/') | |
runs-on: ubuntu-latest | |
environment: Production | |
permissions: | |
id-token: write | |
contents: write | |
steps: | |
- uses: actions/checkout@v4 | |
- name: SetVars | |
run: | | |
sed -i 's/${AWS::AccountId}/${{ secrets.AWS_ACCOUNT_ID }}/' role/template.yml | |
- name: AWS Credentials | |
uses: aws-actions/configure-aws-credentials@v4 | |
with: | |
role-to-assume: arn:aws:iam::${{ secrets.AWS_ACCOUNT_ID }}:role/GitHubDeployBase | |
role-session-name: ${{ vars.SESSION_NAME }} | |
aws-region: ${{ vars.AWS_REGION }} | |
- name: SAM Deploy Role | |
run: | | |
cd role | |
sam build | |
sam package | |
sam deploy | |
- name: AWS Credentials | |
uses: aws-actions/configure-aws-credentials@v4 | |
with: | |
role-to-assume: arn:aws:iam::${{ secrets.AWS_ACCOUNT_ID }}:role/GitHubDeployCoreAccountSubscriptionEstimate | |
role-session-name: ${{ vars.SESSION_NAME }} | |
aws-region: ${{ vars.AWS_REGION }} | |
- name: SAM Deploy Step Function | |
run: | | |
sam build | |
sam package | |
sam deploy | |
- name: Get Version | |
id: semver | |
uses: ietf-tools/semver-action@v1 | |
with: | |
token: ${{ github.token }} | |
branch: ${{ steps.getpr.outputs.branch }} | |
- name: Create Release | |
uses: ncipollo/release-action@v1 | |
with: | |
tag: ${{ steps.semver.outputs.nextStrict }} |