Skip to content

Publish Package to npmjs #2

Publish Package to npmjs

Publish Package to npmjs #2

Workflow file for this run

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 }}