Skip to content

publish-npm

publish-npm #19

Workflow file for this run

name: publish-npm
on:
workflow_run:
workflows: [build-and-upload-binaries]
types: [completed]
jobs:
on-success:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}
steps:
- name: Setup
uses: actions/checkout@v4
- name: Checkout
uses: actions/setup-node@v4
with:
registry-url: "https://registry.npmjs.org/"
node-version-file: "./rari-npm/package.json"
- name: Generate Schema
working-directory: ./rari-npm
run: npm install && npm run export-schema && npm run generate-types
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Publish
working-directory: ./rari-npm
run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}