Skip to content

docs: correct the release command in CONTRIBUTING, and its voice #46

docs: correct the release command in CONTRIBUTING, and its voice

docs: correct the release command in CONTRIBUTING, and its voice #46

Workflow file for this run

name: Push
on: push
jobs:
test:
name: Lint, build, and test
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: pnpm/action-setup@0977fd99725f1db4007ccb2928dbb4e90d06cc86 # v6.0.10
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: 24.x
cache: pnpm
- run: pnpm install --frozen-lockfile
- run: pnpm lint
# eslint doesn't enforce formatting, so without this the tree drifts out
# of prettier's shape silently and the next person to touch a file gets
# unrelated reformatting mixed into their diff.
- run: pnpm format:check
# `pnpm build` only compiles src/. This is the same check over test/ too,
# which is otherwise never type-checked: a test can call a renamed option
# or a changed signature and go on passing by testing nothing.
- run: pnpm typecheck
- run: pnpm build
- run: pnpm test --run
publish:
name: Publish to npm
needs: test
if: startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: pnpm/action-setup@0977fd99725f1db4007ccb2928dbb4e90d06cc86 # v6.0.10
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: 24.x
cache: pnpm
registry-url: 'https://registry.npmjs.org'
- run: pnpm install --frozen-lockfile
- run: pnpm build
- run: npm publish --access public
release:
name: Create GitHub release
needs: publish
if: startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-latest
permissions:
# to create the release. Kept in its own job so the npm publish job's
# token stays read-only.
contents: write
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
# Notes come from the CHANGELOG.md section git-cliff wrote during
# `pnpm version`, which is part of the tagged commit — so this needs
# neither full history nor a second pass over the git log.
- name: Create release
run: |
./scripts/release-notes.sh "$GITHUB_REF_NAME" > /tmp/notes.md
gh release create "$GITHUB_REF_NAME" \
--title "$GITHUB_REF_NAME" \
--verify-tag \
--notes-file /tmp/notes.md
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}