From 099ae0eb9f6afb778a7c4f640147d955249b05e9 Mon Sep 17 00:00:00 2001 From: Brian Rutledge Date: Mon, 19 Oct 2020 13:43:25 -0400 Subject: [PATCH] Move more Travis jobs to GitHub Actions (#709) * Add release job * Remove Travis configuration * Update docs --- .github/workflows/main.yml | 16 ++++++++++++++++ .travis.yml | 26 -------------------------- docs/contributing.rst | 3 +-- 3 files changed, 17 insertions(+), 28 deletions(-) delete mode 100644 .travis.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 5c52b1dd..5908ebdb 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -67,3 +67,19 @@ jobs: run: python -m pip install tox - name: Build docs run: python -m tox -e docs + + release: + needs: [lint, types, test, docs] + if: github.event_name == 'push' && contains(github.ref, 'refs/tags/') + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-python@v2 + with: + python-version: 3.8 + - name: Install dependencies + run: python -m pip install tox + - name: Release + run: tox -e release + env: + TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }} diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 99b5edbd..00000000 --- a/.travis.yml +++ /dev/null @@ -1,26 +0,0 @@ -dist: xenial -language: python -cache: pip - -env: - global: - TOXENV: python - -matrix: - fast_finish: true - - include: - - python: &latest_py3 3.8 - - - stage: deploy - if: tag IS present - python: *latest_py3 - env: - TOXENV: release - after_script: skip - -install: - - pip install tox - -script: - - tox diff --git a/docs/contributing.rst b/docs/contributing.rst index 6b1e569c..a9652c88 100644 --- a/docs/contributing.rst +++ b/docs/contributing.rst @@ -203,7 +203,7 @@ A checklist for creating, testing, and distributing a new version. #. Merge the pull request, and ensure the `GitHub Actions`_ build passes. #. Create a new git tag with ``git tag -m "Release v{version}" {version}``. #. Push the new tag with ``git push upstream {version}``. -#. Watch the release in `Travis`_. +#. Watch the release in `GitHub Actions`_. #. Send announcement email to `distutils-sig mailing list`_ and celebrate. @@ -224,7 +224,6 @@ merge into a single tool; see `ongoing discussion .. _`tox`: https://tox.readthedocs.io/ .. _`pytest`: https://docs.pytest.org/ .. _`GitHub Actions`: https://github.com/pypa/twine/actions -.. _`Travis`: https://travis-ci.com/github/pypa/twine .. _`isort`: https://timothycrosley.github.io/isort/ .. _`black`: https://black.readthedocs.io/ .. _`flake8`: https://flake8.pycqa.org/