Skip to content

V1.0.0

V1.0.0 #24

Workflow file for this run

name: Release
on:
release:
types: [published]
permissions:
contents: read
pages: write
id-token: write
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
cache: 'npm'
registry-url: https://registry.npmjs.org
# Capture the name of the published release to an environment variable
# See https://stackoverflow.com/questions/58177786/get-the-current-pushed-tag-in-github-actions
- run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- run: npm install
# Modify package.json, inserting version attribute
- run: npm version $RELEASE_VERSION --no-git-tag-version
# Perform publish, which will also run prepublishOnly
- run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- run: npm run generate-docs
- uses: actions/upload-pages-artifact@v2
with:
path: 'docs/'
- uses: actions/deploy-pages@v2