-
Notifications
You must be signed in to change notification settings - Fork 46
44 lines (38 loc) · 1.27 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
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 "/*"