Publish Package to npmjs #2
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 Package to npmjs | |
on: | |
release: | |
types: [created] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
id-token: write | |
steps: | |
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 | |
- uses: actions/[email protected] | |
with: | |
node-version: '18.x' | |
# required for credentials to be taken in account | |
registry-url: 'https://registry.npmjs.org' | |
- name: Install latest npm | |
run: npm install -g npm | |
- name: Install | |
run: yarn install | |
- name: Test | |
run: yarn test | |
- name: Publish | |
run: npm publish --provenance --access public | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |