Skip to content

Publish NPM Package #65

Publish NPM Package

Publish NPM Package #65

Workflow file for this run

name: Publish NPM Package
on:
push:
tags:
- v*
jobs:
build:
runs-on: ubuntu-22.04
permissions:
id-token: write
contents: write # required to get token for "npm provenance" and to dispatch event
steps:
- uses: actions/checkout@v4
- name: Build Setup
uses: ./.github/actions/build-setup
with:
registry-url: 'https://registry.npmjs.org'
- run: npm publish --provenance --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Trigger workflows in charge of notifying other repositories
uses: peter-evans/repository-dispatch@v3
with:
# use the default GITHUB_TOKEN, this is possible because we are dispatching the same repository
event-type: new_version_available_on_npm
client-payload: "{ version: ${{ inputs.version }} }"