From fdf2dd82d130984ea71c9c97341480bfc46ebe2a Mon Sep 17 00:00:00 2001 From: Francis Charette-Migneault Date: Tue, 31 May 2022 17:43:15 -0400 Subject: [PATCH] add pypi deploy job on tagged release --- .github/workflows/release.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..8e2dfb0 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,26 @@ +name: Release +on: + - pull_request + - push + - release + - workflow_dispatch + +jobs: + deploy_pypi: + if: ${{ success() && (contains(github.ref, 'refs/tags') || github.ref == 'refs/heads/master') }} + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: "0" + - name: Setup Python + uses: actions/setup-python@v2 + with: + python-version: "3.9" + - name: Build Distribution Package + run: python setup.py sdist && python setup.py bdist_wheel + - name: Push Package to PyPi + uses: pypa/gh-action-pypi-publish@release/v1 + with: + user: __token__ + password: ${{ secrets.PYPI_API_TOKEN }}