Skip to content

Bump @types/node from 18.11.18 to 20.14.5 #85

Bump @types/node from 18.11.18 to 20.14.5

Bump @types/node from 18.11.18 to 20.14.5 #85

Workflow file for this run

name: Node.js CI
on:
push:
branches:
- main
- develop
pull_request:
release:
types: [ released ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x]
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'yarn'
- run: yarn install
- run: yarn build --if-present
- run: npx prettier --check src/
- run: npx eslint src/
# - run: yarn ci
- run: yarn test
release:
if: github.ref == 'refs/heads/main' || (github.event_name == 'release' && github.event.action == 'released')
runs-on: ubuntu-latest
permissions:
id-token: write # To use OIDC role authentication in aws-actions/configure-aws-credentials
needs: [build]
steps:
- uses: actions/checkout@v4
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ secrets.AWS_ROLE }}
aws-region: ${{ secrets.AWS_REGION }}
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 18.x
cache: 'yarn'
- run: yarn install
- name: Build Staging React App
if: github.ref == 'refs/heads/main'
run: yarn build
env:
REACT_APP_CONFIG_SERVICE_URL: "https://safe-config.staging.5afe.dev"
REACT_APP_SHOW_CONFIG_SERVICE_SELECTOR: "true"
- name: Build Production React App
if: (github.event_name == 'release' && github.event.action == 'released')
run: yarn build
env:
REACT_APP_CONFIG_SERVICE_URL: "https://safe-config.safe.global"
REACT_APP_SHOW_CONFIG_SERVICE_SELECTOR: "false"
- name: Deploy to Staging S3 bucket
if: github.ref == 'refs/heads/main'
run: aws s3 sync ./build/ "s3://$BUCKET_NAME/current" --delete
env:
BUCKET_NAME: ${{ secrets.AWS_STAGING_BUCKET_NAME }}
- name: Upload release build files for production
if: (github.event_name == 'release' && github.event.action == 'released')
run: aws s3 sync ./build/ "s3://$BUCKET_NAME/releases/$VERSION" --delete
env:
BUCKET_NAME: ${{ secrets.AWS_STAGING_BUCKET_NAME }}
VERSION: ${{ github.event.release.tag_name }}
- name: Call script to prepare production deployments
if: (github.event_name == 'release' && github.event.action == 'released')
run: bash ./scripts/github/prepare_production_deployment.sh
env:
PROD_DEPLOYMENT_HOOK_TOKEN: ${{ secrets.PROD_DEPLOYMENT_HOOK_TOKEN }}
PROD_DEPLOYMENT_HOOK_URL: ${{ secrets.PROD_DEPLOYMENT_HOOK_URL }}
VERSION_TAG: ${{ github.event.release.tag_name }}