Skip to content

add cicd + codeowners #1

add cicd + codeowners

add cicd + codeowners #1

Workflow file for this run

name: Production
on:
push:
branches:
- main
# TODO: id-token: write is needed for configure-aws-credentials
# but it seems to wipe out all other permissions and breaks other steps
permissions: write-all
jobs:
release_please:
name: Create Release
runs-on: ubuntu-latest
outputs:
release_created: ${{ steps.release.outputs.release_created }}
steps:
- uses: google-github-actions/release-please-action@v3
id: release
with:
command: manifest
deploy:
needs: release_please
if: needs.release_please.outputs.release_created
name: Deploy
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: '16'
cache: 'npm'
- name: Install npm dependencies
run: npm ci
- name: Run Tests
run: npm run test:ci
- name: Build library
run: npm run build:all
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-region: us-east-1
role-to-assume: arn:aws:iam::089941056973:role/github-actions-apptentive-javascript
- name: Deploy to production
run: npm run deploy
- name: Invalidate CloudFront
uses: chetan/invalidate-cloudfront-action@v2
env:
DISTRIBUTION: ${{ secrets.CF_DISTRIBUTION_ID }}
PATHS: '/v1/'