Skip to content

Commit

Permalink
publish python package
Browse files Browse the repository at this point in the history
Signed-off-by: Andrew Whitehead <[email protected]>
  • Loading branch information
andrewwhitehead committed Feb 18, 2021
1 parent d54c94d commit edb0cd1
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
name: "Build Packages"

"on": push
"on":
release:
types: [created]
workflow_dispatch:
inputs:
publish:
description: "Publish packages"
required: true
default: "false"

jobs:
build-manylinux:
Expand Down Expand Up @@ -155,3 +163,14 @@ jobs:
with:
name: python-${{ runner.os }}
path: wrappers/python/dist/*

- if: |
(github.event_name == 'release' ||
(github.event_name == 'workflow_dispatch' &&
github.event.inputs.publish == 'true'))
name: Publish python package
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
twine upload --skip-existing wrappers/python/dist/*

0 comments on commit edb0cd1

Please sign in to comment.