File tree Expand file tree Collapse file tree 1 file changed +27
-0
lines changed
Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Enforce Version Update
2+
3+ on :
4+ pull_request :
5+ branches :
6+ - main
7+
8+ jobs :
9+ check-version :
10+ runs-on : ubuntu-latest
11+
12+ steps :
13+ - name : Checkout code
14+ uses : actions/checkout@v3
15+
16+ - name : Check version update
17+ id : check-version
18+ run : |
19+ BASE_VERSION=$(git show origin/main:pyproject.toml | grep '^version' | sed 's/version = "\(.*\)"/\1/')
20+ CURRENT_VERSION=$(grep '^version' pyproject.toml | sed 's/version = "\(.*\)"/\1/')
21+ if [ "$BASE_VERSION" = "$CURRENT_VERSION" ]; then
22+ echo "Error: Version in pyproject.toml was not updated."
23+ exit 1
24+ fi
25+ - name : Approve if version updated
26+ if : ${{ steps.check-version.outcome == 'success' }}
27+ run : echo "Version updated successfully!"
You can’t perform that action at this time.
0 commit comments