Skip to content

Publish Package to npmjs #147

Publish Package to npmjs

Publish Package to npmjs #147

Workflow file for this run

name: Publish Package to npmjs
on:
release:
types: [created]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
ref: "main"
# Setup .npmrc file to publish to npm
- uses: actions/setup-node@v2
with:
node-version: "20.x"
registry-url: "https://registry.npmjs.org"
- run: git config --global user.email "[email protected]" && git config --global user.name "Github"
- run: npm i --legacy-peer-deps
- run: npm run lib
- run: npm version ${{github.ref_name}}
- run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- run: git push --force