We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d54c94d commit edb0cd1Copy full SHA for edb0cd1
.github/workflows/build.yml
@@ -1,6 +1,14 @@
1
name: "Build Packages"
2
3
-"on": push
+"on":
4
+ release:
5
+ types: [created]
6
+ workflow_dispatch:
7
+ inputs:
8
+ publish:
9
+ description: "Publish packages"
10
+ required: true
11
+ default: "false"
12
13
jobs:
14
build-manylinux:
@@ -155,3 +163,14 @@ jobs:
155
163
with:
156
164
name: python-${{ runner.os }}
157
165
path: wrappers/python/dist/*
166
+
167
+ - if: |
168
+ (github.event_name == 'release' ||
169
+ (github.event_name == 'workflow_dispatch' &&
170
+ github.event.inputs.publish == 'true'))
171
+ name: Publish python package
172
+ env:
173
+ TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
174
+ TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
175
+ run: |
176
+ twine upload --skip-existing wrappers/python/dist/*
0 commit comments