File tree Expand file tree Collapse file tree 1 file changed +14
-2
lines changed
Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -2,15 +2,27 @@ on: push
22
33jobs :
44 check-js-build :
5- name : Check JS build artifacts
5+ name : Check JS version number and build artifacts
66 runs-on : ubuntu-latest
77 steps :
88 - uses : actions/checkout@v4
99 - name : Set up Python
1010 uses : actions/setup-python@v5
1111 with :
1212 python-version : " 3.x"
13-
13+
14+ - name : Check that version number for JS project matches version number for Python project
15+ run : |
16+ PYPROJECT_PATH="pyproject.toml"
17+ PKGJSON_PATH="js/package.json"
18+ PYPROJECT_VERSION=$(awk -F'"' '/^version/ {print $2; exit}' $PYPROJECT_PATH)
19+ JSPROJECT_VERSION=$(cat $PKGJSON_PATH | jq -r '.version')
20+ if [ "$PYPROJECT_VERSION" != "$JSPROJECT_VERSION" ]; then
21+ echo "❌ Version number $JSPROJECT_VERSION in $PKGJSON_PATH does not match version number $PYPROJECT_VERSION in $PYPROJECT_PATH"
22+ exit 1
23+ else
24+ echo "✅ Version number $JSPROJECT_VERSION in $PKGJSON_PATH matches version number $PYPROJECT_VERSION in $PYPROJECT_PATH"
25+ fi
1426 - name : Install Node
1527 uses : actions/setup-node@v2
1628 with :
You can’t perform that action at this time.
0 commit comments