ci: use npm trusted publishing and release v0.1.2 #2
Workflow file for this run
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 to npm | |
| on: | |
| push: | |
| tags: | |
| - 'v*' | |
| jobs: | |
| publish: | |
| name: Publish dumplingai-cli | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| id-token: write # for npm provenance | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| # npm trusted publishing requires npm >= 11.5.1 (Node >= 22.14.0). | |
| node-version: '24' | |
| registry-url: 'https://registry.npmjs.org' | |
| - uses: pnpm/action-setup@v4 | |
| with: | |
| run_install: false | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Typecheck | |
| run: pnpm --filter dumplingai-cli typecheck | |
| - name: Test | |
| run: pnpm --filter dumplingai-cli test | |
| - name: Build | |
| run: pnpm --filter dumplingai-cli build | |
| - name: Show npm version | |
| run: npm --version | |
| - name: Publish | |
| working-directory: packages/cli | |
| run: npm publish --provenance --access public |