Skip to content

fix(pkg): normalize repository.url and bugs.url casing for npm proven… #2

fix(pkg): normalize repository.url and bugs.url casing for npm proven…

fix(pkg): normalize repository.url and bugs.url casing for npm proven… #2

Workflow file for this run

name: Release
on:
push:
tags:
- "v*.*.*"
jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: write
id-token: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "20"
registry-url: "https://registry.npmjs.org"
- name: Install dependencies
run: npm ci
- name: Verify tag matches package.json version
run: |
TAG="${GITHUB_REF_NAME#v}"
PKG=$(node -p "require('./package.json').version")
if [ "$TAG" != "$PKG" ]; then
echo "::error::Tag $GITHUB_REF_NAME ($TAG) does not match package.json version $PKG"
exit 1
fi
echo "Tag and package.json both at $PKG"
- name: Publish to npm
run: npm publish --provenance
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
generate_release_notes: true