Update package.json #39
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 Package | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build-and-publish: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v4 | |
- name: Set up Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: "20.x" | |
registry-url: "https://registry.npmjs.org" | |
scope: "@toqen" | |
- uses: pnpm/action-setup@v3 | |
name: Install pnpm | |
with: | |
version: 8 | |
- name: Install main packages | |
run: pnpm install | |
- name: Install component packages | |
run: pnpm install | |
working-directory: ./src/react | |
- name: Copy README to components directory | |
run: cp README.md ./src/react/ | |
- name: Build package | |
run: pnpm run build | |
working-directory: ./src/react | |
- name: Publish to npm | |
run: pnpm publish --access public --no-git-checks | |
working-directory: ./src/react | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |