From 3a6b3cfd02fe49a22b00f6858a0f95dba38a58cb Mon Sep 17 00:00:00 2001 From: Kendell R Date: Sat, 6 Mar 2021 06:43:37 -0800 Subject: [PATCH] Add auto-publish mechanism --- .github/workflows/auto-publish.yaml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/workflows/auto-publish.yaml diff --git a/.github/workflows/auto-publish.yaml b/.github/workflows/auto-publish.yaml new file mode 100644 index 00000000..8117ce0d --- /dev/null +++ b/.github/workflows/auto-publish.yaml @@ -0,0 +1,28 @@ +name: Auto-Publish to PyPi + +on: + release: + types: [created] + +jobs: + deploy: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: '3.x' + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install setuptools wheel twine + - name: Build and publish + env: + TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} + TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} + run: | + python setup.py sdist bdist_wheel + twine upload dist/*