Skip to content

v1.0.1

v1.0.1 #3

Workflow file for this run

name: Publish to npm
on:
release:
types: [created]
permissions:
contents: read
id-token: write
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
registry-url: 'https://registry.npmjs.org'
# Ensure npm 11.5.1 or later for trusted publishing
- run: npm install -g npm@latest
- name: Install dependencies
run: npm ci
- name: Update package version from release tag
run: |
TAG_VERSION=${GITHUB_REF#refs/tags/}
TAG_VERSION=${TAG_VERSION#v}
npm version $TAG_VERSION --no-git-tag-version --allow-same-version
- name: Publish to npm
run: npm publish --provenance --access public