Skip to content

release

release #10

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
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 github-actions@github.com
- run: npm version ${{ inputs.version }}
if: inputs.version != 'doconly'
- run: git show HEAD
- run: |
npm whoami
npm publish --access=public
if: inputs.version != 'doconly'
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- run: git push origin master v${{ inputs.version }}
if: inputs.version != 'doconly'
- name: Fetching gh-pages branch
uses: actions/checkout@v4
with:
ref: gh-pages
path: build/gh-pages
- name: Updating API documentation in gh-pages branch
run: |
rm -rf *
cp -a ../apidoc/* .
git add .
git commit --allow-empty -a -m "Updating from ${{ github.sha }}"
git push origin gh-pages
working-directory: ./build/gh-pages