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 8
8
pull_request :
9
9
branches :
10
10
- main
11
+ - ' [0-9]+.[0-9]+.[0-9]+' # Match M.m.hf pattern (e.g., 1.2.3, 2.0.1, etc.)
11
12
12
13
jobs :
13
14
testpypipublish :
14
15
name : Build and Publish Test Distribution
15
16
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, '.'))
16
21
steps :
17
22
- name : Checkout
18
23
uses : actions/checkout@v3
@@ -31,12 +36,15 @@ jobs:
31
36
env :
32
37
DEVBUILD : 1
33
38
- 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, '.'))
35
43
uses : pypa/gh-action-pypi-publish@release/v1
36
44
with :
37
45
user : __token__
38
46
password : ${{ secrets.PYPITEST_PASSWORD }}
39
- repository_url : https://test.pypi.org/legacy/
47
+ repository-url : https://test.pypi.org/legacy/
40
48
pypipublish :
41
49
name : Build and Publish Production Distribution
42
50
runs-on : ubuntu-latest
You can’t perform that action at this time.
0 commit comments