Skip to content

Workflow file for this run

name: build and publish package
on:
release:
types: [ created ]
jobs:
build-and-publish:
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
steps:
- uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 18
registry-url: https://npm.pkg.github.com
- name: Update package.json version
uses: jossef/action-set-json-field@v1
with:
file: ./package.json
field: version
value: ${{ github.event.release.name }}
- name: Package install
run: npm install
- name: Publish package
run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}