Release #14
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: | |
push: | |
tags: [v*] | |
env: | |
PROJECT: casimir | |
STAGE: prod | |
AWS_REGION: us-east-2 | |
jobs: | |
deploy: | |
name: Deploy | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out the repo | |
uses: actions/checkout@v3 | |
with: | |
submodules: 'recursive' | |
- name: Get the tag name | |
run: | | |
echo "TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV | |
- name: Configure AWS credentials | |
uses: aws-actions/configure-aws-credentials@v1 | |
with: | |
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
aws-region: ${{ env.AWS_REGION }} | |
- name: Install and build all package dependencies | |
run: npm ci | |
env: | |
PUBLIC_STAGE: ${{ env.STAGE }} | |
- name: Deploy cdk infrastructure | |
run: npm run deploy:cdk | |
# - name: Migrate users database | |
# run: npm run migrations:users | |
- name: Check out develop | |
uses: actions/checkout@v3 | |
with: | |
ref: develop | |
token: ${{ github.token }} | |
- name: Reset release branch | |
run: | | |
git fetch origin master:master | |
git reset --hard master | |
- name: Create Pull Request | |
uses: peter-evans/create-pull-request@v3 | |
with: | |
base: develop | |
branch: master | |
reviewers: robosupport | |
token: ${{ github.token }} | |
title: "Sync master with develop" | |
- name: Slack the team | |
if: ${{ success() || failure() }} | |
uses: slackapi/[email protected] | |
with: | |
payload: | | |
{ | |
"blocks": [ | |
{ | |
"type": "section", | |
"text": { | |
"type": "mrkdwn", | |
"text": "<https://casimir.co | *:ocean: Casimir (Prod)*> deployment finished with <https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }} | _${{ job.status }}_>" | |
} | |
} | |
] | |
} | |
env: | |
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} | |
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK |