v0.3.6 #23
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 | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| id-token: write | |
| concurrency: | |
| group: publish-${{ github.ref }} | |
| cancel-in-progress: false | |
| jobs: | |
| publish: | |
| name: Publish package | |
| runs-on: ubuntu-latest | |
| environment: npm | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 24.x | |
| registry-url: https://registry.npmjs.org | |
| cache: npm | |
| - name: Show tool versions | |
| run: | | |
| node --version | |
| npm --version | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Set version from release tag | |
| if: github.event_name == 'release' | |
| run: | | |
| version="${GITHUB_REF_NAME#v}" | |
| echo "Publishing version $version (from tag $GITHUB_REF_NAME)" | |
| npm version "$version" --no-git-tag-version --allow-same-version | |
| - name: Typecheck | |
| run: npm run typecheck | |
| - name: Test | |
| run: npm test | |
| - name: Build | |
| run: npm run build | |
| - name: Verify package contents | |
| run: npm pack --dry-run | |
| - name: Dry-run publish | |
| if: github.event_name == 'workflow_dispatch' | |
| run: npm publish --access public --provenance --dry-run | |
| - name: Publish to npm | |
| if: github.event_name == 'release' | |
| run: npm publish --access public --provenance |