@@ -2,11 +2,11 @@ name: Build, Test, Lint & Upload to TestPyPI and PyPI for Rechtspraak_Extractor
22
33on :
44 push :
5- branches : [ rechtspraak ]
5+ branches : [ main ]
66 tags :
77 - ' v*.*.*'
88 pull_request :
9- branches : [ rechtspraak ]
9+ branches : [ main, develop ]
1010
1111jobs :
1212 lint :
@@ -25,14 +25,14 @@ jobs:
2525 uses : github/super-linter@v4
2626 env :
2727 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
28- DEFAULT_BRANCH : ' rechtspraak '
28+ DEFAULT_BRANCH : ' main '
2929 VALIDATE_PYTHON_BLACK : true
3030 IGNORE_GITIGNORED_FILES : true
3131 VALIDATE_ALL_CODEBASE : false
3232
3333 test :
3434 needs : lint
35- if : github.event_name == 'pull_request'
35+ if : github.event_name == 'pull_request' && github.base_ref == 'main'
3636 name : Test on ${{ matrix.os }}
3737 runs-on : ${{ matrix.os }}
3838 strategy :
9292 path : dist/
9393
9494 testpypi-publish :
95- if : github.event_name == 'pull_request'
95+ if : github.event_name == 'pull_request' && github.base_ref == 'main'
9696 name : Publish to TestPyPI
97- needs : build
97+ needs : [ build, test]
9898 runs-on : ubuntu-latest
9999 environment :
100100 name : testpypi
@@ -136,7 +136,7 @@ jobs:
136136 uses : pypa/gh-action-pypi-publish@release/v1
137137
138138 github-release :
139- if : github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
139+ if : github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') && github.base_ref == 'main'
140140 name : Sign the Python distribution with Sigstore and upload them to GitHub Releases
141141 needs :
142142 - pypi-publish
0 commit comments