Skip to content

Publish to npm

Publish to npm #2

Workflow file for this run

name: Publish to npm
on:
release:
types:
- published
permissions:
contents: read
jobs:
npm-publish:
runs-on: ubuntu-latest
permissions:
id-token: write
steps:
- name: Harden Runner
uses: step-security/harden-runner@1b05615854632b887b69ae1be8cbefe72d3ae423 # v2.6.0
with:
egress-policy: audit
- name: Checkout
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
- name: Setup Node.js
uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3.8.1
with:
node-version: 18
registry-url: https://registry.npmjs.org
- name: Install dependencies
run: npm ci --production
- name: Publish to npm
run: |
npm publish --provenance --ignore-scripts --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_GUIDESMITHS }}