Skip to content

Commit 93d7c1a

Browse files
Merge branch 'main' into fix/fetch-package
2 parents 95e5008 + e055e18 commit 93d7c1a

File tree

3 files changed

+70
-7
lines changed

3 files changed

+70
-7
lines changed

.github/workflows/version-check.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Version Consistency Check
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
release:
9+
types: [published]
10+
11+
jobs:
12+
github:
13+
name: Check GitHub server version consistency
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v4
17+
18+
- name: Check version consistency
19+
run: |
20+
PACKAGE_VERSION=$(node -p "require('./src/github/package.json').version")
21+
TS_VERSION=$(grep -o '".*"' ./src/github/common/version.ts | tr -d '"')
22+
23+
if [ "$PACKAGE_VERSION" != "$TS_VERSION" ]; then
24+
echo "::error::Version mismatch detected!"
25+
echo "::error::package.json version: $PACKAGE_VERSION"
26+
echo "::error::version.ts version: $TS_VERSION"
27+
exit 1
28+
else
29+
echo "✅ Versions match: $PACKAGE_VERSION"
30+
fi

0 commit comments

Comments
 (0)