From fb6e7abc22dc931c52e8f84ab62168e351748862 Mon Sep 17 00:00:00 2001 From: 1138-4EB <1138-4EB@users.noreply.github.com> Date: Mon, 9 Sep 2019 02:45:15 +0200 Subject: [PATCH] ci: remove .travis.yml, deploy with twine from a GHA workflow --- .github/workflows/push.yml | 24 ++++++++++++++++++++++++ .travis.yml | 19 ------------------- tools/release.py | 2 ++ 3 files changed, 26 insertions(+), 19 deletions(-) delete mode 100644 .travis.yml diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 73033a505..61bd6c2e6 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -112,3 +112,27 @@ jobs: run: | export PATH=$PATH:$(pwd)/../ghdl-v0.36/bin tox -e py${{ matrix.task }} -- --color=yes + + deploy: + runs-on: ubuntu-latest + needs: [ fmt, lin, docker, win ] + if: github.event_name == 'release' && github.event.action == 'created' + steps: + - uses: actions/checkout@v1 + with: + submodules: recursive + - uses: actions/setup-python@v1 + with: + python-version: 3.8 + - name: install dependencies + run: | + pip install -U pip + pip install -U setuptools wheel twine + - name: build and deploy to PyPI + env: + TWINE_USERNAME: __token__ + TWINE_PASSWORD: ${{ secrets.VUNIT_HDL_PYPI_DEPLOY_TOKEN }} + run: | + ./tools/release.py validate + python setup.py sdist + twine upload dist/* diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 81bc472b2..000000000 --- a/.travis.yml +++ /dev/null @@ -1,19 +0,0 @@ -language: python -python: '3.8' -install: pip install tox -script: - - git fetch --unshallow --tags - - python tools/release.py validate -# Deploy to PyPI whenever the package version has changed -# When a package version has not changed a new upload will not be triggered -if: tag IS present -deploy: - provider: pypi - distributions: sdist - skip_cleanup: true - skip_upload_docs: true - user: $PYPI_USER - password: $PYPI_PASSWORD - on: - repo: VUnit/vunit - all_branches: true diff --git a/tools/release.py b/tools/release.py index f2aa2586a..56e6ec928 100644 --- a/tools/release.py +++ b/tools/release.py @@ -1,3 +1,5 @@ +#!/usr/bin/env python3 + # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this file, # You can obtain one at http://mozilla.org/MPL/2.0/.