File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change 5
5
workflows : ["Build Macos", "Build linux", "Build win"]
6
6
types :
7
7
- completed
8
+ push :
9
+ branches :
10
+ - sep-workflows
11
+ tags :
12
+ - " v*"
8
13
9
14
jobs :
10
15
release_and_publish :
11
16
name : Release and Publish
12
17
runs-on : ubuntu-latest
13
- if : ${{ github.event.workflow_run.conclusion == 'success' && startsWith(github.ref, 'refs/tags/') }}
18
+ if : ${{ ( github.event_name == 'workflow_run' && github. event.workflow_run.conclusion == 'success') || (github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') ) }}
14
19
steps :
15
20
- name : Checkout code
16
21
uses : actions/checkout@v3
44
49
working-directory : dist
45
50
46
51
- name : Publish to TestPyPI
52
+ if : startsWith(github.ref, 'refs/tags/')
47
53
uses : pypa/gh-action-pypi-publish@v1.8.5
48
54
with :
49
55
user : __token__
52
58
packages-dir : dist
53
59
54
60
- name : Create Release
61
+ if : startsWith(github.ref, 'refs/tags/')
55
62
env :
56
63
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
57
64
uses : softprops/action-gh-release@v1
You can’t perform that action at this time.
0 commit comments