File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22
33on :
44 push :
5- branches : [master]
5+ branches : [master, dev ]
66 pull_request_target :
7- branches : [master]
7+ branches : [master, dev ]
88
99jobs :
1010 test :
5858
5959 report :
6060 name : Report Coverage
61+ if : github.ref == 'refs/heads/master'
6162 runs-on : ubuntu-latest
6263 needs : test
6364 steps :
7778 token : ${{ secrets.CODECOV_TOKEN }}
7879 directory : ./coverage-artifacts/
7980 fail_ci_if_error : false
81+
82+ check-version :
83+ name : Check for accidental version bump
84+ if : github.base_ref == 'dev'
85+ runs-on : ubuntu-latest
86+ steps :
87+ - name : Checkout repository
88+ uses : actions/checkout@v4
89+ with :
90+ fetch-depth : 0
91+
92+ - name : Verify that version was not bumped
93+ run : |
94+ if ! git diff --quiet origin/dev HEAD -- pyproject.toml; then
95+ echo "::error::Version in pyproject.toml was changed in a PR to dev."
96+ echo "Version bumping should only happen in a release PR to master."
97+ exit 1
98+ fi
99+ echo "Version check passed for pyproject.toml"
You can’t perform that action at this time.
0 commit comments