From 58553b1da03f75f286fe28a8b61197540ed4defa Mon Sep 17 00:00:00 2001 From: glipR <37640160+glipR@users.noreply.github.com> Date: Sat, 22 May 2021 16:13:25 +1000 Subject: [PATCH] Add pypi workflow. --- .github/workflows/pypi_release.yml | 34 ++++++++++++++++++++++++++++++ MANIFEST.in | 3 ++- 2 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/pypi_release.yml diff --git a/.github/workflows/pypi_release.yml b/.github/workflows/pypi_release.yml new file mode 100644 index 0000000..3838fac --- /dev/null +++ b/.github/workflows/pypi_release.yml @@ -0,0 +1,34 @@ +# This workflow will install Python dependencies, run tests and lint with a variety of Python versions +# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions + +name: Build and deploy to PyPi + +on: + release: + types: [released] + +jobs: + build-and-release: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Set up Python 3.x + uses: actions/setup-python@v2 + with: + python-version: 3.8 + - name: Install dependencies + run: | + sudo apt-get update + sudo apt-get install python3-dev + python -m pip install --upgrade pip + if [ -f requirements.txt ]; then pip install -r requirements.txt; fi + if [ -f requirements-dev.txt ]; then pip install -r requirements-dev.txt; fi + - name: Build dist + run: python setup.py sdist bdist_wheel + - name: Publish distribution 📦 to PyPI + uses: pypa/gh-action-pypi-publish@master + with: + user: __token__ + password: ${{ secrets.pypi_password }} + diff --git a/MANIFEST.in b/MANIFEST.in index e13a8d2..0f71047 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1 +1,2 @@ -global-include *.py \ No newline at end of file +global-include *.py +prune venv \ No newline at end of file