chore(release): v1.3.0 #38
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*' | |
| permissions: | |
| id-token: write | |
| contents: read | |
| jobs: | |
| publish: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Guard against runaway patch versions | |
| run: | | |
| PATCH="${GITHUB_REF_NAME##*.}" | |
| if [ "${PATCH:-0}" -ge 20 ]; then | |
| echo "::error::Tag ${GITHUB_REF_NAME} has patch >= 20 - bump the minor version (reset patch) instead of more patches." | |
| exit 1 | |
| fi | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: '24' | |
| registry-url: 'https://registry.npmjs.org' | |
| - run: npm install | |
| - run: npm run build | |
| - run: npx vitest run | |
| - name: Set version from tag | |
| run: | | |
| VERSION="${{ github.ref_name }}" | |
| VERSION="${VERSION#v}" | |
| npm version $VERSION --allow-same-version --no-git-tag-version | |
| - run: npm publish --provenance --access public | |
| env: | |
| NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |