Bugfix 3D Channel Stats (#781) #56
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: | |
branches: | |
- main | |
concurrency: ${{ github.workflow }}-${{ github.ref }} | |
jobs: | |
release: | |
name: Release | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: pnpm/action-setup@v3 | |
id: pnpm-install | |
with: | |
version: 7 | |
run_install: true | |
- name: Create Release Pull Request or Publish to npm | |
id: changesets | |
uses: changesets/action@v1 | |
with: | |
title: Create Release | |
version: pnpm run version | |
publish: pnpm run publish | |
createGithubReleases: false | |
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 "/*" | |
- name: "Delete redundant @vivjs/* tags and releases" | |
# We have "fixed" the versioning for all @vivjs packages, | |
# meaning all packages get the same changes. This creates | |
# a lot of noise when making releases since every package | |
# gets a separate tag and release from changesets. | |
# | |
# We could maybe write our own action rather than use actions/changesets | |
# but this way is easier. | |
if: steps.changesets.outputs.published == 'true' | |
run: | | |
# Delete @vivjs releases | |
gh release list --repo hms-dbmi/viv \ | |
| grep '^@vivjs' \ | |
| awk '{print $1}' \ | |
| xargs -I {} gh release delete {} --repo hms-dbmi/viv -y | |
# Delete @vivjs tags | |
gh api /repos/hms-dbmi/viv/git/refs/tags \ | |
| jq -r '.[].ref' \ | |
| grep '^refs/tags/@vivjs' \ | |
| sed 's#refs/tags/##' \ | |
| xargs -I {} gh api -X DELETE /repos/hms-dbmi/viv/git/refs/tags/{} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |