Skip to content

Merge pull request #19 from react18-tools/upgrade #27

Merge pull request #19 from react18-tools/upgrade

Merge pull request #19 from react18-tools/upgrade #27

Workflow file for this run

name: Publish to NPM
# publish only when package json has changed - assuming version upgrade
on:
push:
branches: [main]
paths: "packages/react18-themes/package.json"
jobs:
publish:
runs-on: ubuntu-latest
permissions:
packages: write
contents: write
defaults:
run:
working-directory: ./packages/react18-themes
steps:
- uses: actions/checkout@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/setup-node@v3
with:
registry-url: https://registry.npmjs.org
node-version: 18
- run: npm i -g pnpm && pnpm i
name: Install dependencies
# fail and not publish if any of the unit tests are failing
- name: Test
run: pnpm test
- name: Update topics and Publish to NPM
run: pnpm build && pnpm publish-package && node scope.js && pnpm publish-package
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
# Publish lite version
- run: node lite.js && pnpm build && pnpm publish-package && node scope.js && pnpm publish-package
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}