Skip to content

Release/v3.15.0 (#85) #6

Release/v3.15.0 (#85)

Release/v3.15.0 (#85) #6

Workflow file for this run

name: Publish v3 to NPM (latest)
on:
push:
tags:
- 'v3*'
jobs:
release:
if: startsWith(github.ref, 'refs/tags/v3')
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '22.x'
registry-url: 'https://registry.npmjs.org'
- name: Ensure package version is 3.x.x
run: |
VERSION=$(node -p "require('./package.json').version")
echo "Detected version: $VERSION"
case "$VERSION" in
3.*) echo "OK: version is 3.x.x" ;;
*) echo "ERROR: package.json version must be 3.x.x for v3 tags" && exit 1 ;;
esac
- name: Publish to NPM with dist-tag "latest"
run: npm run prepack && npm publish --tag latest --//registry.npmjs.org/:_authToken="$NPM_TOKEN"
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}