-
Notifications
You must be signed in to change notification settings - Fork 981
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Validate in CI that the GitHub server versions in
package.json
and …
…`version.ts` match
- Loading branch information
Showing
2 changed files
with
31 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: Version Consistency Check | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- "src/github/**" | ||
|
||
jobs: | ||
github: | ||
name: Check GitHub server version consistency | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Check version consistency | ||
run: | | ||
PACKAGE_VERSION=$(node -p "require('./src/github/package.json').version") | ||
TS_VERSION=$(grep -o '".*"' ./src/github/common/version.ts | tr -d '"') | ||
if [ "$PACKAGE_VERSION" != "$TS_VERSION" ]; then | ||
echo "::error::Version mismatch detected!" | ||
echo "::error::package.json version: $PACKAGE_VERSION" | ||
echo "::error::version.ts version: $TS_VERSION" | ||
exit 1 | ||
else | ||
echo "✅ Versions match: $PACKAGE_VERSION" | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
// If the format of this file changes, so it doesn't simply export a VERSION constant, | ||
// this will break .github/workflows/version-check.yml. | ||
export const VERSION = "0.6.2"; |