Skip to content

0.1.2

0.1.2 #1

Workflow file for this run

name: Publish to npm
on:
push:
tags:
- "v*"
permissions:
contents: read
id-token: write
concurrency:
group: publish-${{ github.ref }}
cancel-in-progress: false
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Enable Corepack
run: corepack enable
- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: 24
registry-url: https://registry.npmjs.org
cache: pnpm
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Check lint
run: pnpm lint:check
- name: Check formatting
run: pnpm format:check
- name: Check types
run: pnpm typecheck
- name: Run tests
run: pnpm test
- name: Build package
run: pnpm build
- name: Verify tag matches package version
run: |
PACKAGE_VERSION="$(node -p "require('./package.json').version")"
TAG_VERSION="${GITHUB_REF_NAME#v}"
if [ "$PACKAGE_VERSION" != "$TAG_VERSION" ]; then
echo "Tag v$TAG_VERSION does not match package.json version $PACKAGE_VERSION"
exit 1
fi
- name: Preview package contents
run: npm pack --dry-run --ignore-scripts
- name: Publish package
run: npm publish --ignore-scripts