Publish Package to NPMJS.org #3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/open-resource-discovery | |
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' | |
# Skipping install since all assets are pre-built already | |
# - run: npm install | |
- 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 }} |