Skip to content

v0.3.0

v0.3.0 #4

Workflow file for this run

name: Publish to npm
on:
release:
types: [published]
concurrency:
group: ${{ github.workflow }}
cancel-in-progress: false
permissions:
contents: read
id-token: write
jobs:
verify-version:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Check source version matches tag
run: |
TAG="${GITHUB_REF_NAME#v}"
SOURCE=$(jq -r .version package.json)
if [ "$TAG" != "$SOURCE" ]; then
echo "::error::Tag v$TAG does not match source version $SOURCE — bump package.json first"
exit 1
fi
test:
needs: verify-version
name: Test (Node ${{ matrix.node-version }})
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
node-version: [20, 22, 24]
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: npm
- run: npm ci
- run: npm run build
- run: npm run lint
- run: npm run format:check
- run: npm run typecheck
- run: npm test
- run: npm run attw
publish:
name: Publish
needs: test
runs-on: ubuntu-latest
environment: release
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v4
with:
node-version: 24
cache: npm
registry-url: https://registry.npmjs.org
- run: npm ci
- run: npm run build
- run: npm publish --provenance --access public