From ab6b6a5eecaac4d7a38577da9706817f890f06a5 Mon Sep 17 00:00:00 2001 From: regisss <15324346+regisss@users.noreply.github.com> Date: Fri, 5 Apr 2024 09:15:18 +0200 Subject: [PATCH] Add PyPI release workflow (#11) * Add PyPI release workflow * Test * Clean --- .github/workflows/pypi-release.yaml | 33 +++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .github/workflows/pypi-release.yaml diff --git a/.github/workflows/pypi-release.yaml b/.github/workflows/pypi-release.yaml new file mode 100644 index 00000000..c4e37b70 --- /dev/null +++ b/.github/workflows/pypi-release.yaml @@ -0,0 +1,33 @@ +name: PyPI Release +on: + workflow_dispatch: + push: + tags: + - v* + +env: + PYPI_TOKEN: ${{ secrets.PYPI_TOKEN_DIST }} + +jobs: + upload_package: + name: Upload package to PyPI + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + + - name: Install dependencies + run: pip install -U build twine + + - name: Clean + run: | + rm -rf build/ + rm -rf dist/ + + - name: Build the wheels + run: python -m build . + + - name: Upload to PyPI + run: | + pip install twine + twine upload dist/* -u __token__ -p "$PYPI_TOKEN"