v0.1.0 #9
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 | |
| on: | |
| release: | |
| types: | |
| - published | |
| permissions: | |
| contents: read | |
| jobs: | |
| publish: | |
| runs-on: ubuntu-latest | |
| environment: npm | |
| env: | |
| NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
| NPM_CONFIG_PROVENANCE: ${{ github.event.repository.private && 'false' || 'true' }} | |
| permissions: | |
| contents: read | |
| id-token: write | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v6 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: 24 | |
| registry-url: https://registry.npmjs.org | |
| cache: npm | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Verify package | |
| run: npm run verify | |
| - name: Publish with trusted publishing | |
| if: ${{ env.NPM_TOKEN == '' }} | |
| run: npm publish --access public | |
| - name: Publish with token fallback | |
| if: ${{ env.NPM_TOKEN != '' }} | |
| run: npm publish --access public | |
| env: | |
| NODE_AUTH_TOKEN: ${{ env.NPM_TOKEN }} |