You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
echo "No release-affecting files changed (e.g. only test/docs). Skipping version-bump check."
40
+
echo "No release-affecting files changed (e.g. only test/docs/.github). Skipping version-bump check."
39
41
exit 0
40
42
41
43
- name: Fail when version bump was missed
@@ -75,4 +77,13 @@ jobs:
75
77
echo "::error::Version bump required: package.json version ($PKG_VERSION) equals latest tag ($LATEST_TAG). Please bump the version in package.json."
76
78
exit 1
77
79
fi
78
-
CHANGELOG_VERSION=$(sed -nE 's/^## \[v?([0-9]+\.[0-9]+\.[0-9]+).*/\1/p' CHANGELOG.md | head -1)
80
+
CHANGELOG_VERSION=$(sed -nE 's/^## \[v?([0-9]+\.[0-9]+\.[0-9]+).*/\1/p' CHANGELOG.md | head -1)
81
+
if [ -z "$CHANGELOG_VERSION" ]; then
82
+
echo "::error::Could not find a version entry in CHANGELOG.md (expected line like '## [v1.0.0](...)')."
83
+
exit 1
84
+
fi
85
+
if [ "$CHANGELOG_VERSION" != "$PKG_VERSION" ]; then
86
+
echo "::error::CHANGELOG version mismatch: CHANGELOG.md top version ($CHANGELOG_VERSION) does not match package.json version ($PKG_VERSION). Please add or update the CHANGELOG entry for $PKG_VERSION."
87
+
exit 1
88
+
fi
89
+
echo "Version bump check passed: package.json and CHANGELOG.md are at $PKG_VERSION (latest tag: $LATEST_TAG)."
0 commit comments