Skip to content

release

release #31

Workflow file for this run

name: release
on:
workflow_dispatch:
inputs:
version:
type: string
required: true
description: Version number (x.y.z)
jobs:
release:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20.x'
cache: npm
registry-url: 'https://registry.npmjs.org'
- run: npm ci
- run: |
git config --global user.name github-actions
git config --global user.email [email protected]
- if: inputs.version != 'doconly'
run: npm version ${{ inputs.version }}
- run: git show HEAD
- run: npm run build
- run: npm run docs
- run: |
npm whoami
npm publish --access=public --provenance
working-directory: dist/package
if: inputs.version != 'doconly'
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- run: git push origin master v${{ inputs.version }}
if: inputs.version != 'doconly'
- uses: actions/checkout@v4
with:
ref: gh-pages
path: gh-pages
- name: Publish documentation
working-directory: gh-pages
run: |
mv dev ..
rm -rf *
cp -a ../dist/docs/* .
mv ../dev .
git add .
git commit --allow-empty -a -m "Updating from ${{ github.sha }}"
git push origin gh-pages