From 11c6d9f8380c3b1ea0fcb1ce9498cbfbac01a631 Mon Sep 17 00:00:00 2001 From: Faisal Shahzad <84210709+seowings@users.noreply.github.com> Date: Sun, 24 Sep 2023 02:28:37 +0200 Subject: [PATCH] pipy publishing workflow --- .github/workflows/pipy-publish.yml | 34 ++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .github/workflows/pipy-publish.yml diff --git a/.github/workflows/pipy-publish.yml b/.github/workflows/pipy-publish.yml new file mode 100644 index 0000000..e4a8e14 --- /dev/null +++ b/.github/workflows/pipy-publish.yml @@ -0,0 +1,34 @@ +# This workflow will upload a Python Package using Twine when a release is created +# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries + +name: Upload Python Package + +on: + #push: + # branches: [main] + + release: + types: [published] + +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/* \ No newline at end of file