Skip to content

v0.0.2

v0.0.2 #5

Workflow file for this run

name: Publish to npm
on:
release:
types: [published]
workflow_dispatch:
inputs:
tag:
description: "Tag to release (e.g. v0.0.1)"
required: true
jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write # Required for provenance
steps:
- name: Checkout
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
fetch-depth: 0
- name: Checkout release tag
run: |
git fetch --tags
TAG="${{ github.event.release.tag_name || github.event.inputs.tag }}"
if [ -z "$TAG" ]; then
echo "Error: No tag provided in release event or workflow_dispatch input"
exit 1
fi
echo "Checking out tag $TAG"
git checkout "$TAG"
- name: Setup Node.js
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
with:
node-version: '22'
registry-url: 'https://registry.npmjs.org'
- name: Install latest npm
run: npm install -g npm@latest
- name: Install dependencies
run: npm ci
- name: Build package
run: npm run build
- name: Publish to npm
run: npm publish --provenance --access public