Skip to content

release workflow must not deploy to the tag-blocked pages environment #5

release workflow must not deploy to the tag-blocked pages environment

release workflow must not deploy to the tag-blocked pages environment #5

Workflow file for this run

name: Release
# Cut a release: bump "version" in package.json, merge to main, then
# git tag vX.Y.Z && git push origin vX.Y.Z
# The tag must match package.json (checked below); the workflow verifies
# the tagged build and publishes a GitHub release. Pages deploys stay on
# the main-branch deploy workflow (the github-pages environment blocks
# tag builds, so this workflow must not touch it).
on:
push:
tags: ['v*']
permissions:
contents: write
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: actions/setup-node@v4
with:
node-version: '24'
cache: npm
- run: npm ci
- name: Check tag matches package.json
run: |
pkg="v$(node -p "require('./package.json').version")"
[ "${{ github.ref_name }}" = "$pkg" ] || {
echo "tag ${{ github.ref_name }} != package.json $pkg"
exit 1
}
- run: npm run lint
- run: npm test
- run: npm run build
- name: Create GitHub release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: gh release create "${{ github.ref_name }}" --generate-notes