Merge pull request #7 from mayank1513:cleanup #17
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |