From 20095969ea839fff03f9f08848b0b36942fd71cf Mon Sep 17 00:00:00 2001 From: Naveen M K Date: Wed, 4 Nov 2020 20:59:42 +0530 Subject: [PATCH] Create python-publish.yml --- .github/workflows/python-publish.yml | 32 ++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/python-publish.yml diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml new file mode 100644 index 0000000..8a43f7b --- /dev/null +++ b/.github/workflows/python-publish.yml @@ -0,0 +1,32 @@ +name: Upload Python Package + +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 + sudo apt-get install libpango1.0-dev + sudo apt install libcairo2-dev pkg-config python3-dev + + - name: Build and publish + env: + TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} + TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} + run: | + python setup.py sdist + twine upload dist/*