From 217e0cb383496ffb7e41fbab64013dfb1721627b Mon Sep 17 00:00:00 2001 From: Leif Denby Date: Fri, 25 Mar 2022 11:25:06 +0100 Subject: [PATCH] Add github releases pypi auto upload action Add github action which automatically builds and publishes releases tagged on github to pypi --- .github/workflows/ci-pypi-deploy.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 .github/workflows/ci-pypi-deploy.yml diff --git a/.github/workflows/ci-pypi-deploy.yml b/.github/workflows/ci-pypi-deploy.yml new file mode 100644 index 0000000..23baf9e --- /dev/null +++ b/.github/workflows/ci-pypi-deploy.yml @@ -0,0 +1,24 @@ +name: package-release + +on: + workflow_dispatch: + pull_request: + push: + branches: + - master + release: + types: + - published + +jobs: + build: + name: build and upload release to pypi + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-python@v2 + - uses: casperdcl/deploy-pypi@v2 + with: + password: ${{ secrets.PYPI_TOKEN }} + pip: wheel -w dist/ --no-deps . + upload: ${{ github.event_name == 'release' && github.event.action == 'published' }}