Skip to content

Workflow file for this run

name: NPM Publish
on:
release:
types: [ created ]
permissions: # added using https://github.com/step-security/secure-workflows
contents: read
jobs:
publish-npm:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- name: 🔐 Harden Runner
uses: step-security/harden-runner@eb238b55efaa70779f274895e782ed17c84f2895 # v2.6.1
with:
disable-sudo: true
egress-policy: block
allowed-endpoints: >
fulcio.sigstore.dev:443
github.com:443
registry.npmjs.org:443
rekor.sigstore.dev:443
- name: ⚙️ Git Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: ⚙️ Install Node versions
uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1
with:
node-version: 20
registry-url: https://registry.npmjs.org
- name: ⚙️ Install NPM last version
run: npm install -g npm
- name: ⚙️ Install dependencies
run: npm ci
- name: 📦 Publish in NPM registry
run: |
npm publish --provenance --ignore-scripts --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_GUIDESMITHS }}