Publish npm #15
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 | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| package: | |
| description: Package to publish | |
| required: true | |
| default: better-harness | |
| type: choice | |
| options: | |
| - better-harness | |
| - harness | |
| - harness-ui | |
| - harness-studio | |
| permissions: | |
| contents: read | |
| id-token: write | |
| jobs: | |
| publish: | |
| if: github.repository == 'QoderAI/better-harness' | |
| environment: npm | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version: 24.x | |
| registry-url: https://registry.npmjs.org | |
| package-manager-cache: false | |
| - run: npm ci | |
| - run: npm run check | |
| - name: Publish Better Harness | |
| if: ${{ inputs.package == 'better-harness' }} | |
| run: npm publish --access public | |
| env: | |
| NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
| - name: Publish selected Harness workspace | |
| if: ${{ inputs.package != 'better-harness' }} | |
| run: npm publish --workspace "@qoder-ai/${{ inputs.package }}" --access public | |
| env: | |
| NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |