Skip to content

v0.1.2

v0.1.2 #2

Workflow file for this run

name: Publish
on:
release:
types:
- published
permissions:
contents: read
id-token: write
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
ref: ${{ github.event.release.tag_name }}
- uses: actions/setup-node@v6
with:
node-version: 24
registry-url: https://registry.npmjs.org/
cache: npm
- run: npm ci
- run: npm run format:check
- run: npm run build
- run: npm test
- run: npm pack --dry-run
- name: Verify tag matches package version
run: |
PACKAGE_VERSION="$(node -p "require('./package.json').version")"
RELEASE_TAG="${{ github.event.release.tag_name }}"
TAG_VERSION="${RELEASE_TAG#v}"
if [ "$PACKAGE_VERSION" != "$TAG_VERSION" ]; then
echo "Release tag ${RELEASE_TAG} does not match package version ${PACKAGE_VERSION}."
exit 1
fi
- run: npm publish --access public