From 5fbc61bccdf73eb18cb65df4032175d3064425a9 Mon Sep 17 00:00:00 2001 From: korikuzma Date: Mon, 26 Sep 2022 13:32:02 -0400 Subject: [PATCH] add github action to make pypi release when a gh release is made --- .github/workflows/pypi_release.yaml | 24 ++++++++++++++++++++++++ 1 file changed, 24 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 0000000..5b2053d --- /dev/null +++ b/.github/workflows/pypi_release.yaml @@ -0,0 +1,24 @@ +name: Make PyPI release + +on: + release: + types: [created] + +jobs: + deploy: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-python@v2 + - name: Install dependencies + run: | + python3 -m pip install --upgrade pip + pip install setuptools wheel twine + - name: Build and publish + env: + TWINE_USERNAME: __token__ + TWINE_PASSWORD: ${{ secrets.PYPI }} + run: | + python3 setup.py sdist bdist_wheel + twine upload dist/*