File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2929 uses : actions/setup-node@v4
3030 with :
3131 node-version : " 22.16.0"
32- cache : " yarn"
33- cache-dependency-path : |
34- package.json
35- yarn.lock
3632 registry-url : " https://registry.npmjs.org"
3733 - name : Install yarn package manager
3834 run : npm install --global yarn
5147 run : |
5248 yarn run clean
5349 yarn run build
50+ - name : Verify package version matches tag
51+ run : |
52+ set -euo pipefail
53+ PKG_VERSION=$(node -p "require('./package.json').version")
54+ TAG="${{ github.event.release.tag_name }}"
55+ if [ -z "$TAG" ]; then TAG="${GITHUB_REF#refs/tags/}"; fi
56+ if [ -z "$TAG" ]; then
57+ echo "Error: could not determine release tag from github.event.release.tag_name or GITHUB_REF"
58+ exit 1
59+ fi
60+ TAG="${TAG#v}"
61+ if [ "$PKG_VERSION" != "$TAG" ]; then
62+ echo "Version mismatch: package.json=$PKG_VERSION tag=$TAG"
63+ exit 1
64+ fi
65+ echo "Version OK: $PKG_VERSION"
5466 - name : Publish to npm
5567 run : |
5668 npm publish .
Original file line number Diff line number Diff line change 7171 uses : actions/setup-node@v4
7272 with :
7373 node-version : " 22.16.0"
74- cache : " yarn"
75- cache-dependency-path : |
76- package.json
77- yarn.lock
7874 - name : Install yarn package manager
7975 run : npm install --global yarn
8076 - name : Install dependencies
You can’t perform that action at this time.
0 commit comments