From b1a3d4ccab78e7ee230864ef9c99144ae7a8d3de Mon Sep 17 00:00:00 2001 From: Eric Higgins Date: Sun, 26 Jan 2020 23:52:06 -0800 Subject: [PATCH] Switch to github action instead of travis for uploading to pypi --- .github/workflows/pythonpublish.yml | 27 +++++++++++++++++++++++++++ .travis.yml | 11 ----------- 2 files changed, 27 insertions(+), 11 deletions(-) create mode 100644 .github/workflows/pythonpublish.yml diff --git a/.github/workflows/pythonpublish.yml b/.github/workflows/pythonpublish.yml new file mode 100644 index 0000000..6d41ee6 --- /dev/null +++ b/.github/workflows/pythonpublish.yml @@ -0,0 +1,27 @@ +name: Upload Python Package + +on: + release: + types: [created] + +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - name: Set up Python + uses: actions/setup-python@v1 + with: + python-version: '2.7' + - 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/.travis.yml b/.travis.yml index ad5a8fa..3b0e700 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,14 +12,3 @@ install: - pip install -r requirements.txt script: - python setup.py test -before_deploy: -- pip install twine -deploy: - provider: pypi - edge: true - user: "__token__" - password: - - secure: "oX4Hg8EDIo4RDoqHwYSBi9lVHRcrQl1sdySdR+JnSIpRO0D0ckTDwoz6nuejRe4/2YEGyIYSkPsUEnMMQmiDS5jkgqr1JNV3s8I2JjjCryof5si2Jf5Mk7gbqprEgJqgnKK551HovP35e/fvwpb1wiEddjDPSYN8UF8kbjTPGOE=" - - secure: "cCgbdtJAi0GyzVd2DRo8irQvohE8zIM3WbwcPx1F/+OcWNuvb0xDOOVIcnVD2r5KqcUqTwyNjWdBBLhkMNiwKfwVVAVPwj9cEi6YIjlEiD49kIMswcgzZM5E6dxVQ1IgDtdbI8YpAbopl4iTLz7qO9FHCyHJ049d5K91/8212Eo=" - on: - tags: true