From 993f73f474149d69686074251f13c2a0737a6432 Mon Sep 17 00:00:00 2001 From: Jason Fried Date: Wed, 28 Oct 2020 12:07:22 -0700 Subject: [PATCH] Add pypi upload action, update CI python versions Summary: Setup action so we can release from github. Also include 3.9 in the CI also delete the travis-ci config Reviewed By: cooperlees Differential Revision: D24597938 fbshipit-source-id: 09cbacf148cf1fadf1916478735e05e3f903f31c --- .github/workflows/ci.yml | 6 +++--- .github/workflows/pypi_upload.yml | 27 +++++++++++++++++++++++++++ .travis.yml | 16 ---------------- 3 files changed, 30 insertions(+), 19 deletions(-) create mode 100644 .github/workflows/pypi_upload.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ebcd381..63ea062 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,14 +8,14 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - python-version: [3.7, 3.8] + python-version: [3.7, 3.8, 3.9] os: [ubuntu-latest] steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v2 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v1 + uses: actions/setup-python@v2 with: python-version: ${{ matrix.python-version }} diff --git a/.github/workflows/pypi_upload.yml b/.github/workflows/pypi_upload.yml new file mode 100644 index 0000000..8d27409 --- /dev/null +++ b/.github/workflows/pypi_upload.yml @@ -0,0 +1,27 @@ +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.9' + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install setuptools wheel twine + - name: Build and publish + env: + TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }} + run: | + python setup.py sdist bdist_wheel + twine upload dist/* diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 8039dc4..0000000 --- a/.travis.yml +++ /dev/null @@ -1,16 +0,0 @@ -language: python -cache: pip -dist: xenial - -python: - - 3.7 - - 3.8 - - nightly -install: pip install -e . -script: python setup.py test - -matrix: - fast_finish: true - allow_failures: - - python: "latest" -