From b9a0cdff2a7beaab88c6e7841a5f21c00f665941 Mon Sep 17 00:00:00 2001 From: rmorshea Date: Thu, 23 Apr 2020 18:28:55 -0700 Subject: [PATCH] try using gh actions to publish to pypi --- .github/workflows/publish.yml | 30 ++++++++++++++++++++++++++++++ .travis.yml | 14 +++++++------- 2 files changed, 37 insertions(+), 7 deletions(-) create mode 100644 .github/workflows/publish.yml diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 000000000..5cc50e3a6 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,30 @@ +# 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: 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@v1 + 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 bdist_wheel + twine upload dist/* diff --git a/.travis.yml b/.travis.yml index 446634d96..3bf2f266a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,13 +1,18 @@ dist: xenial + language: python + python: - 3.6 - 3.7 - 3.8 - 3.8-dev + cache: apt + addons: chrome: stable + before_install: - sudo apt update - curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.34.0/install.sh | bash @@ -20,16 +25,11 @@ before_install: - rm ~/chromedriver_linux64.zip - sudo mv -f ~/chromedriver /usr/bin/ - sudo chmod +x /usr/bin/chromedriver + install: - pip install -r requirements.txt - python setup.py build - pip install .[all] + script: - bash scripts/test.sh -deploy: - provider: pypi - on: - tags: true - user: __token__ - password: - secure: dpqXuLuCHKGDiu8NOv3YjKGRXj1s0HLT4+9X6vslqXBhMpB3a4IqkWmxwEq5u9Ch4Hg4pFP08zCOYDIu3bCC/7HCU8dYe8Klv1ReO63+nTF2ffQr3x/FefmzSMZfwCE2NPjEix2jypqYuGQ+1/HXGacMp9Uoa1XYhaZwo+6ggkUPVqF9Lgaae2WSJmvM9D4GeOz6p0oehDZgH8jQi8byiHeeik0CTkzwvBxL6ylMowanYiG2/St5R+iMrZNMLYvm6zS9oxJhorXUM91SuxzILy/7BWMo4iMEIuzMk5I2m9qTM311lF7Cgs5lVtxz6vH/vIPp70uuvpT1tV/TgKU78pu+ucnkH4Yy7DqXXJTl4fB23RoU8damwtZBQrIcD2kAbnrhby3myXOIh7t/z2d9LPW3+VoUd9d2Lk1dYHUmuz6fbVKEmJSaS1WTbf0AMroS56uicx4TI0M1fcg84kvFO0UZQ3l2Wy15sLAzn04FuV/P/q3L00TMsFSPwNXg3ckqJWEWe9nrfi57bfcjuX/GGVC+RvX+6e6hczBzJsQjZI9FCIhKdbmwvIxvijeq6dQzJyT8ABjL0YImZcbb0WjfHWqTYV0k2aXXeg2Lnu1OCX4EOt2FYlZCn6KcWEpRO7ZglKxFGfnBMEFcaCIC1fLvTTm5+JLw6COPgFJCm7HWUGo=