Skip to content

chore: bump version to 0.4.0 #15

chore: bump version to 0.4.0

chore: bump version to 0.4.0 #15

Workflow file for this run

name: Publish to npm
on:
push:
tags:
- 'v*'
jobs:
ci:
uses: ./.github/workflows/ci.yml
publish:
needs: ci
runs-on: ubuntu-latest
permissions:
contents: write
id-token: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '22'
registry-url: 'https://registry.npmjs.org'
- run: npm ci
- name: Verify tag matches package.json version
run: |
PKG_VERSION="v$(node -p "require('./package.json').version")"
if [ "$PKG_VERSION" != "${{ github.ref_name }}" ]; then
echo "::error::Tag ${{ github.ref_name }} doesn't match package.json version $PKG_VERSION"
exit 1
fi
- run: npm run build
- name: Verify package contents
run: npm pack --dry-run
- name: Publish to npm
run: npm publish --access public --provenance
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
generate_release_notes: true