Skip to content

feat: Migrate to changesets for CHANGELOG gen and releases (#716) #1

feat: Migrate to changesets for CHANGELOG gen and releases (#716)

feat: Migrate to changesets for CHANGELOG gen and releases (#716) #1

Workflow file for this run

name: Release
on:
push:
branches:
- main
concurrency: ${{ github.workflow }}-${{ github.ref }}
jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v2
id: pnpm-install
with:
version: 7
run_install: true
- run: pnpm build
- name: Create Release Pull Request or Publish to npm
id: changesets
uses: changesets/action@v1
with:
title: Create Release
publish: pnpm changeset publish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Upload Avivator to S3
# Make an Avivator Release if we published something to NPM
if: steps.changesets.outputs.published == 'true'
env:
AWS_DEFAULT_REGION: us-east-1
AWS_ACCESS_KEY_ID: ${{ secrets.VIV_S3_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.VIV_S3_ACCESS_KEY_SECRET }}
run: |
aws s3 cp --recursive sites/avivator/dist s3://avivator.gehlenborglab.org
aws s3 cp --recursive sites/docs/dist s3://viv.gehlenborglab.org
aws cloudfront create-invalidation --distribution-id E204VEQ9XF37EF --paths "/*"