Skip to content

0.31.0

0.31.0 #57

Workflow file for this run

name: Publish to NPM
on:
release:
types: [published]
workflow_dispatch:
permissions:
id-token: write
contents: read
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Use Node.js
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: '24.14.1'
registry-url: 'https://registry.npmjs.org'
- name: Pin npm for trusted publishing
run: npm install -g npm@11.10.0
- name: Determine release tag
id: release_tag
run: |
if [[ "${{ github.ref }}" == *"-rc"* ]] || [[ "${{ github.ref }}" == *"-RC"* ]]; then
echo "tag=next" >> "$GITHUB_OUTPUT"
else
echo "tag=latest" >> "$GITHUB_OUTPUT"
fi
- name: Install dependencies and build
run: |
npm ci
npm run build
- name: Publish
run: npm publish --provenance --access public --tag ${{ steps.release_tag.outputs.tag }}