publish #11
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 | |
| on: | |
| release: | |
| types: [published] | |
| workflow_dispatch: | |
| inputs: | |
| dry_run: | |
| description: Run npm publish in dry-run mode | |
| required: true | |
| default: true | |
| type: boolean | |
| jobs: | |
| publish: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| id-token: write | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version: 24 | |
| registry-url: https://registry.npmjs.org | |
| cache: npm | |
| - run: npm ci | |
| - run: npm run typecheck | |
| - if: github.event_name == 'workflow_dispatch' && inputs.dry_run | |
| run: npm pack --dry-run | |
| - if: github.event_name == 'release' || (github.event_name == 'workflow_dispatch' && !inputs.dry_run) | |
| run: npm publish |