Skip to content

v2026.4.6-beta

v2026.4.6-beta #3

Workflow file for this run

name: Publish to npm
on:
push:
tags:
- v*
jobs:
publish:
runs-on: ubuntu-24.04
permissions:
id-token: write # Required for OIDC trusted publishing
contents: read
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
# setup-node with registry-url is required for OIDC trusted publishing
- name: Setup Node.js
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
with:
node-version: 24
registry-url: "https://registry.npmjs.org"
- name: Install dependencies
run: npm install
- name: Publish to npm with OIDC provenance
run: |
VERSION=$(node -p "require('./package.json').version")
if echo "$VERSION" | grep -qE '(alpha|beta)'; then
TAG=$(echo "$VERSION" | grep -oE '(alpha|beta)')
echo "Pre-release detected: publishing with --tag $TAG"
npm publish --provenance --tag "$TAG"
else
echo "Stable release: publishing with default (latest) tag"
npm publish --provenance
fi