Publish NPM packages #71
This file contains hidden or 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 NPM packages | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| package: | |
| description: 'Package to publish (react-ui, react-core, or stream)' | |
| required: true | |
| type: choice | |
| options: | |
| - react-ui | |
| - react-core | |
| - stream | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: js | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - uses: pnpm/action-setup@v2 | |
| with: | |
| version: 9.15.4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 18 | |
| registry-url: 'https://registry.npmjs.org' | |
| cache: pnpm | |
| cache-dependency-path: '**/pnpm-lock.yaml' | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Build projects | |
| run: pnpm -r run ci | |
| - name: Publish package | |
| working-directory: ./js/packages/${{ inputs.package }} | |
| run: pnpm publish --access public | |
| env: | |
| NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |