File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change 1
1
name : Check Version Bump and Publish to PyPI
2
2
3
3
on :
4
- push :
4
+ workflow_run :
5
+ workflows : ["Python Tests"]
5
6
branches :
6
7
- main
7
- paths :
8
- - ' pyproject.toml '
8
+ types :
9
+ - completed
9
10
10
11
# Required for PyPI trusted publishing
11
12
permissions :
@@ -14,11 +15,14 @@ permissions:
14
15
15
16
jobs :
16
17
check-version-and-publish :
18
+ # Only proceed if the referenced workflow completed successfully
19
+ if : ${{ github.event.workflow_run.conclusion == 'success' }}
17
20
runs-on : ubuntu-latest
18
21
steps :
19
22
- uses : actions/checkout@v3
20
23
with :
21
- fetch-depth : 0 # This fetches all history for comparing versions
24
+ fetch-depth : 0
25
+ ref : ${{ github.event.workflow_run.head_sha }}
22
26
23
27
- name : Set up Python
24
28
uses : actions/setup-python@v4
You can’t perform that action at this time.
0 commit comments