File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change 88 pull_request :
99 branches :
1010 - main
11+ - ' [0-9]+.[0-9]+.[0-9]+' # Match M.m.hf pattern (e.g., 1.2.3, 2.0.1, etc.)
1112
1213jobs :
1314 testpypipublish :
1415 name : Build and Publish Test Distribution
1516 runs-on : ubuntu-latest
17+ if : |
18+ github.event_name == 'pull_request' &&
19+ github.event.pull_request.head.repo.full_name == github.repository &&
20+ (github.base_ref == 'main' || contains(github.base_ref, '.'))
1621 steps :
1722 - name : Checkout
1823 uses : actions/checkout@v3
@@ -31,12 +36,15 @@ jobs:
3136 env :
3237 DEVBUILD : 1
3338 - name : Publish distribution package to Test PyPI
34- if : github.event.pull_request.head.repo.full_name == github.repository
39+ if : |
40+ github.event.pull_request.head.repo.full_name == github.repository &&
41+ github.event_name == 'pull_request' &&
42+ (github.base_ref == 'main' || contains(github.base_ref, '.'))
3543 uses : pypa/gh-action-pypi-publish@release/v1
3644 with :
3745 user : __token__
3846 password : ${{ secrets.PYPITEST_PASSWORD }}
39- repository_url : https://test.pypi.org/legacy/
47+ repository-url : https://test.pypi.org/legacy/
4048 pypipublish :
4149 name : Build and Publish Production Distribution
4250 runs-on : ubuntu-latest
You can’t perform that action at this time.
0 commit comments