fix: gate release workflows on full metadata sync

This commit is contained in:
Affaan Mustafa
2026-04-12 02:46:41 -07:00
parent 00c2b38533
commit 93135d7707
2 changed files with 22 additions and 4 deletions

View File

@@ -38,18 +38,21 @@ jobs:
env:
REF_NAME: ${{ github.ref_name }}
- name: Verify plugin.json version matches tag
- name: Verify package version matches tag
env:
TAG_NAME: ${{ github.ref_name }}
run: |
TAG_VERSION="${TAG_NAME#v}"
PLUGIN_VERSION=$(grep -oE '"version": *"[^"]*"' .claude-plugin/plugin.json | grep -oE '[0-9]+\.[0-9]+\.[0-9]+')
if [ "$TAG_VERSION" != "$PLUGIN_VERSION" ]; then
echo "::error::Tag version ($TAG_VERSION) does not match plugin.json version ($PLUGIN_VERSION)"
PACKAGE_VERSION=$(node -p "require('./package.json').version")
if [ "$TAG_VERSION" != "$PACKAGE_VERSION" ]; then
echo "::error::Tag version ($TAG_VERSION) does not match package.json version ($PACKAGE_VERSION)"
echo "Run: ./scripts/release.sh $TAG_VERSION"
exit 1
fi
- name: Verify release metadata stays in sync
run: node tests/plugin-manifest.test.js
- name: Generate release highlights
id: highlights
env: