Skip to content

Release v0.5.0

Release v0.5.0 #9

Workflow file for this run

---
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
name: Release
on:
push:
tags:
- "v*"
permissions: {}
concurrency:
group: release-${{ github.ref }}
cancel-in-progress: false
jobs:
release:
name: Stage npm package and create GitHub release
runs-on: ubuntu-latest
permissions:
contents: write
id-token: write
steps:
- name: Checkout
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with:
persist-credentials: false
- name: Validate release version
run: |
package_version="$(node -p "require('./package.json').version")"
if [[ "$GITHUB_REF_NAME" != "v$package_version" ]]; then
echo "Tag $GITHUB_REF_NAME does not match package.json version $package_version" >&2
exit 1
fi
- name: Setup pnpm
uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 # v6.0.8
with:
version: 9
- name: Setup Node.js
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: 24
registry-url: https://registry.npmjs.org
package-manager-cache: false
- name: Setup npm
run: npm install --global npm@11.15.0
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Check formatting
run: pnpm run format:check
- name: Build
run: pnpm run build
- name: Integration test
run: pnpm run test:integration
- name: Stage npm package
run: |
if [[ "$GITHUB_REF_NAME" == *-* ]]; then
npm stage publish --provenance --access public --tag next
else
npm stage publish --provenance --access public
fi
- name: Create draft GitHub release
run: gh release create "$GITHUB_REF_NAME" --draft --generate-notes --verify-tag
env:
GH_TOKEN: ${{ github.token }}