v1.1.2 #8
Workflow file for this run
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: Publish | |
on: | |
release: | |
types: [published] | |
jobs: | |
publish-npm: | |
name: Publish to npm | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
id-token: write | |
pages: write | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Set up Node.js 20 | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
registry-url: https://registry.npmjs.org/ | |
cache: npm | |
- name: Install latest npm version | |
run: npm i -g npm@latest | |
- name: Install dependencies | |
run: npm ci | |
- name: Set project version | |
run: npm version ${TAG_NAME} --git-tag-version=false | |
env: | |
TAG_NAME: ${{ github.event.release.tag_name }} | |
- name: Publish to npm | |
run: npm publish --provenance --access public | |
env: | |
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} | |
- name: Generate docs | |
run: npm run docs | |
- name: Set up pages | |
uses: actions/configure-pages@v4 | |
- name: Upload docs artifact to pages | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
path: docs | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 |