📦 Chore: update actions #21
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: release | |
| permissions: | |
| contents: read | |
| id-token: write | |
| on: | |
| push: | |
| branches: | |
| - master | |
| - alpha | |
| workflow_dispatch: | |
| inputs: | |
| publish_tag: | |
| description: 'npm tag to publish with (default: latest)' | |
| required: false | |
| default: 'latest' | |
| jobs: | |
| build-and-publish: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| run_install: false | |
| version: 10 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: 25 | |
| registry-url: https://registry.npmjs.org | |
| cache: pnpm | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Build | |
| run: pnpm run build | |
| - name: Unset NODE_AUTH_TOKEN | |
| run: unset NODE_AUTH_TOKEN | |
| - name: Publish (master) | |
| if: github.event_name == 'push' && github.ref == 'refs/heads/master' | |
| run: npm publish --access public --provenance | |
| - name: Publish (alpha) | |
| if: github.event_name == 'push' && github.ref == 'refs/heads/alpha' | |
| run: npm publish --tag alpha --access public --provenance | |
| - name: Publish (manual) | |
| if: github.event_name == 'workflow_dispatch' | |
| run: npm publish --tag "${{ inputs.publish_tag || 'latest' }}" --access public --provenance |