Skip to content
This repository has been archived by the owner on Oct 7, 2024. It is now read-only.

fix: wildcard filter #20

fix: wildcard filter

fix: wildcard filter #20

Workflow file for this run

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:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Zig
uses: goto-bus-stop/setup-zig@v2
- name: Setup Cargo Lambda
uses: zerj9/[email protected]
- name: Setup Project
run: |
git config --global url."https://${{ secrets.GH_PROJECT_PAT }}@github.com".insteadOf https://github.com
- name: SetVars
run: |
sed -i 's/${AWS::AccountId}/${{ secrets.AWS_ACCOUNT_ID }}/' infra/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 Role
run: cd infra/role && sam build && sam package && sam deploy --no-fail-on-empty-changeset
- name: AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: arn:aws:iam::${{ secrets.AWS_ACCOUNT_ID }}:role/GitHubDeployPublishDataS3
role-session-name: ${{ vars.SESSION_NAME }}
aws-region: ${{ vars.AWS_REGION }}
- name: SAM Stage
run: cd infra/stage && sam build && sam package && sam deploy --no-fail-on-empty-changeset
- name: Get Version
id: version
run: |
export CURRENT_VERSION=$(grep -m 1 'version = "' Cargo.toml | awk -F '"' '{print $2}')
echo "current=$CURRENT_VERSION" >> $GITHUB_OUTPUT
- name: Create Release
uses: ncipollo/release-action@v1
with:
tag: ${{ steps.version.outputs.current }}