diff options
Diffstat (limited to '.github/workflows/pypi-publish-release.yml')
| -rw-r--r-- | .github/workflows/pypi-publish-release.yml | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/.github/workflows/pypi-publish-release.yml b/.github/workflows/pypi-publish-release.yml new file mode 100644 index 0000000..2071faa --- /dev/null +++ b/.github/workflows/pypi-publish-release.yml @@ -0,0 +1,56 @@ +name: Publish release distribution to PyPI + +on: + push: + tags: + - "v*" + +jobs: + build: + name: Build distribution + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@master + + - name: Set up Python 3.6 + uses: actions/setup-python@v2 + with: + python-version: 3.6 + + - name: Install pep517 + run: >- + python -m + pip install + pep517 + --user + + - name: Build a binary wheel and a source tarball + run: >- + python -m + pep517.build + --source + --binary + --out-dir dist/ + . + + - name: Upload distribution artifact for other jobs + uses: actions/upload-artifact@v2 + with: + name: pkb_client_dist + path: dist/ + + publish: + name: Publish distribution to PyPI + runs-on: ubuntu-latest + needs: build + steps: + - name: Download distribution from build job + uses: actions/download-artifact@v2 + with: + name: pkb_client_dist + path: dist/ + + - name: Publish distribution to PyPI + uses: pypa/gh-action-pypi-publish@master + with: + password: ${{ secrets.pypi_api_key }} |
