Skip to content

release v2.0.0

release v2.0.0 #42

Workflow file for this run

name: Release
on:
push:
branches:
- main
permissions:
contents: write
id-token: write # Required for OIDC Trusted Publishing
concurrency:
cancel-in-progress: true
group: ${{ github.workflow }}
jobs:
release:
runs-on: ubuntu-latest
steps:
# SHA-pinned actions (prevent tag hijacking)
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0
- uses: ./.github/actions/prepare
# Configure registry for OIDC token exchange
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version: '22'
registry-url: 'https://registry.npmjs.org'
- run: git config user.name "${{ github.actor }}"
- run: git config user.email "${{ github.actor }}@users.noreply.github.com"
# Release with OIDC (NO NPM_TOKEN needed)
# ⚠️ Do NOT set NODE_AUTH_TOKEN - OIDC handles auth automatically
- env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Check if the latest commit message contains a release tag pattern (e.g., "release v1.2.3")
# If found, execute release-it without version increment since version was already bumped in the commit
run: |
if git log --format=%B -n 1 | grep -E -q 'release v[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}'; then
pnpm release-it --no-increment --verbose
fi