Version 0.0.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: | |
| release: | |
| types: [published] # Triggers on GitHub Release creation (with tag) | |
| jobs: | |
| publish: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read # For checkout | |
| id-token: write # Required for provenance / trusted publishing | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "22" # Or 'lts/*' | |
| registry-url: "https://registry.npmjs.org" # Optional if using trusted publishing | |
| - name: PNPM setup | |
| uses: pnpm/action-setup@v3 | |
| - name: Deno Setup | |
| uses: denoland/setup-deno@v2 | |
| with: | |
| deno-version: v2.x | |
| - name: Install dependencies | |
| run: pnpm install --no-frozen-lockfile | |
| # - name: Build (not needed, it's included in prepublishOnly) | |
| # run: pnpm build # Optional | |
| - name: Test (optional but recommended) | |
| run: pnpm test | |
| - name: Publish to npm | |
| run: pnpm publish --provenance --access public --no-git-checks # --access public for new/public packages | |
| env: | |
| NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} # Only needed if NOT using trusted publishing |