We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2e63b95 commit 89b539fCopy full SHA for 89b539f
1 file changed
.github/workflows/publish.yml
@@ -18,6 +18,16 @@ jobs:
18
with:
19
node-version: '24'
20
- run: npm ci
21
+ - name: Verify tag matches package.json version
22
+ if: startsWith(github.ref, 'refs/tags/')
23
+ run: |
24
+ TAG_VERSION="${GITHUB_REF#refs/tags/v}"
25
+ PKG_VERSION=$(node -p "require('./package.json').version")
26
+ if [ "$TAG_VERSION" != "$PKG_VERSION" ]; then
27
+ echo "::error::Tag version ($TAG_VERSION) does not match package.json version ($PKG_VERSION)"
28
+ exit 1
29
+ fi
30
+ echo "Version check passed: $PKG_VERSION"
31
- run: npm run build
32
- run: npm test
33
- run: npm publish --provenance
0 commit comments