Skip to content

Commit 51c8bd4

Browse files
committed
update github workflow
1 parent 6774b8b commit 51c8bd4

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

.github/workflows/main.yml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,13 @@
22
name: Python Package Publication
33

44
on:
5+
pull_request:
6+
types: [closed]
7+
branches: [master]
58
workflow_dispatch:
69
inputs:
710
release-version:
811
required: true
9-
dry-run:
10-
required: true
11-
default: true
12-
type: boolean
1312
linux:
1413
type: boolean
1514
required: true
@@ -37,7 +36,7 @@ jobs:
3736
with:
3837
python-versions: 'cp38-cp38 cp39-cp39 cp310-cp310 cp311-cp311'
3938
- name: upload wheel
40-
if: ${{ !inputs.dry-run }}
39+
if: github.event.pull_request.merged == true || github.event_name == 'workflow_dispatch'
4140
run: |
4241
python -m pip install --upgrade pip
4342
python -m pip install wheel setuptools twine
@@ -68,13 +67,13 @@ jobs:
6867
python -m pip install wheel setuptools twine
6968
python setup.py bdist_wheel
7069
- name: upload wheel
71-
if: ${{ !inputs.dry-run }}
70+
if: github.event.pull_request.merged == true || github.event_name == 'workflow_dispatch'
7271
run: |
7372
twine upload dist/*
7473
continue-on-error: false
7574

7675
release-build:
77-
if: ${{ !inputs.dry-run }}
76+
if: github.event.pull_request.merged == true || github.event_name == 'workflow_dispatch'
7877
needs: [ linux-build, other-os-build ]
7978
runs-on: ubuntu-latest
8079
steps:

0 commit comments

Comments
 (0)