From b8f8f4dbc09d4e474fa3b09ec88b4f819bf2161e Mon Sep 17 00:00:00 2001 From: Junzi Sun Date: Sat, 23 Jan 2021 01:35:04 +0100 Subject: [PATCH] add github action for publishing on pypi --- .github/workflows/pypi-publish.yml | 29 +++++++++++++++++++++++++++++ setup.py | 2 +- 2 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/pypi-publish.yml diff --git a/.github/workflows/pypi-publish.yml b/.github/workflows/pypi-publish.yml new file mode 100644 index 0000000..eb6956a --- /dev/null +++ b/.github/workflows/pypi-publish.yml @@ -0,0 +1,29 @@ +# This workflows 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: PyPI Publish + +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/* diff --git a/setup.py b/setup.py index 0e0d7a3..dd688bf 100644 --- a/setup.py +++ b/setup.py @@ -27,7 +27,7 @@ with open(path.join(here, "README.rst"), encoding="utf-8") as f: details = dict( name="pyModeS", - version="2.8", + version="2.9", description="Python Mode-S and ADS-B Decoder", long_description=long_description, url="https://github.com/junzis/pyModeS",