From 911b11440e1ea2545ea9a3aff4409f174f05cce4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20=C5=A0pl=C3=ADchal?= Date: Thu, 9 Jun 2022 20:39:01 +0200 Subject: [PATCH] Add Github Action for PyPI releases --- .github/workflows/release.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 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..b4ca4e4 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,28 @@ +name: release + +on: + release: + types: [published] + workflow_dispatch: + inputs: + ref: + description: 'Tag to release' + required: true + +jobs: + release: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + if: ${{ github.event_name == 'release' }} + - uses: actions/checkout@v2 + if: ${{ github.event_name == 'workflow_dispatch' }} + with: + ref: ${{ github.event.inputs.ref }} + - name: Create dist + run: make wheel + - name: Publish to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 + with: + user: __token__ + password: ${{ secrets.PYPI_API_TOKEN }}