Skip to content
name: Publish library to NPM
on:
release:
types: [published]
jobs:
publish-npm:
if: startsWith(github.event.release.name, '@storyblok/field-plugin@')
name: Publish library to NPM
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: 18.16.0
cache: 'yarn'
registry-url: 'https://registry.npmjs.org'
- run: yarn install --immutable
- name: Build the library
run: yarn build:lib
- name: Copy the root's readme file
run: cp README.md packages/field-plugin/
- name: Publish the package to NPM
run: ./scripts/publish.ts field-plugin
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_PUBLISH}}