From a6c2417fe26bd7f091863e9e7aea5224bce2d3b2 Mon Sep 17 00:00:00 2001 From: Sacrimento Date: Mon, 30 Jan 2023 01:06:38 +0100 Subject: [PATCH] feat: add pypi upload action --- .github/workflows/pypi_upload.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/workflows/pypi_upload.yml diff --git a/.github/workflows/pypi_upload.yml b/.github/workflows/pypi_upload.yml new file mode 100644 index 0000000..8af47af --- /dev/null +++ b/.github/workflows/pypi_upload.yml @@ -0,0 +1,30 @@ +name: pypi_upload + +on: + release: + types: [created] + +jobs: + upload: + name: PyPI Upload + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: 3.x + + - name: Install latest pip, setuptools, build, twine + run: | + python -m pip install --upgrade pip setuptools build twine + - name: Build sdist + wheel + run: | + python -m build + - name: Upload to PyPI via Twine + env: + TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }} + run: | + twine upload --verbose -u '__token__' dist/* \ No newline at end of file