Skip to content

Publish Package to NPMJS.org #2

Publish Package to NPMJS.org

Publish Package to NPMJS.org #2

Workflow file for this run

name: Publish Package to NPMJS.org
on:
workflow_dispatch:
jobs:
publish-to-npmjs:
permissions:
contents: read
id-token: write
runs-on: ubuntu-latest
environment: npmjs:@sap/openapi-specification
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "20.x"
# registry-url is required for releasing packages
registry-url: "https://registry.npmjs.org"
- run: npm ci
- name: Publish package
# --provenance enables the automatic generation of provenance statements
# --access public is only hard required for the initial release, but it doesn't hurt having it setup
run: npm publish --provenance --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}