Skip to content

2.0.0

2.0.0 #6

Workflow file for this run

name: Publish
on:
release:
types: [released, prereleased]
jobs:
publish-npm:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18
registry-url: https://registry.npmjs.org/
- name: Install the latest version of the npm CLI
run: npm install -g npm@latest
- name: Install dependencies, build
run: |
npm ci
npm run build
- name: Publish 'latest'
if: ${{ github.event.action == 'released' }}
run: |
npm publish --provenance
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Publish 'next'
if: ${{ github.event.action == 'prereleased' }}
run: |
npm publish --tag next --provenance
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}