Skip to content

Merge pull request #32 from cam-inc/fix/npm-publish-prerelease-tag #2

Merge pull request #32 from cam-inc/fix/npm-publish-prerelease-tag

Merge pull request #32 from cam-inc/fix/npm-publish-prerelease-tag #2

Workflow file for this run

name: Release
on:
push:
tags:
- 'v[0-9]+\.[0-9]+\.[0-9]+'
- 'v[0-9]+\.[0-9]+\.[0-9]+-rc[0-9]+'
jobs:
release:
runs-on: ubuntu-latest
permissions:
contents: write
id-token: write
steps:
- name: Checkout repository
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- name: Setup Node.js
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
with:
node-version: '24.x'
cache: 'npm'
registry-url: 'https://registry.npmjs.org'
- name: Install dependencies
run: npm ci
- name: Run tests
run: npm test
- name: Build
run: npm run build
- name: Publish to npm with OIDC
run: |
if [[ $GITHUB_REF == refs/tags/*-rc* ]]; then
npm publish --provenance --tag next
else
npm publish --provenance
fi