Skip to content

Publish to npm Registry #27

Publish to npm Registry

Publish to npm Registry #27

Workflow file for this run

name: Publish to npm Registry
on:
workflow_dispatch:
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: install Node.js
uses: actions/setup-node@v3
with:
node-version: 18
registry-url: 'https://registry.npmjs.org'
- name: increment version
run: |
npm set //registry.npmjs.org/:_authToken $NODE_AUTH_TOKEN
npm --no-git-tag-version version $(git describe --abbrev=0 --tags)
env:
NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }}
- name: publish
run: |
npm set //registry.npmjs.org/:_authToken $NODE_AUTH_TOKEN
npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }}