Publish NPM Package #65
Workflow file for this run
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 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 }} }" |