--- kind: pipeline name: default steps: - name: test2.7 image: python:2.7-stretch pull: always environment: PY_COLORS: "1" commands: - pip install tox -q - tox -e $(tox -l | grep py27 | xargs | sed 's/ /,/g') -q when: event: - push - tag - name: test3.5 image: python:3.5-stretch pull: always environment: PY_COLORS: "1" commands: - pip install tox -q - tox -e $(tox -l | grep py35 | xargs | sed 's/ /,/g') -q when: event: - push - tag - name: test3.6 image: python:3.6-stretch pull: always environment: PY_COLORS: "1" commands: - pip install tox -q - tox -e $(tox -l | grep py36 | xargs | sed 's/ /,/g') -q when: event: - push - tag - name: test3.7 image: python:3.7-stretch pull: always environment: PY_COLORS: "1" commands: - pip install tox -q - tox -e $(tox -l | grep py37 | xargs | sed 's/ /,/g') -q when: event: - push - tag - name: build image: python:3.7-alpine pull: true commands: - python setup.py sdist bdist_wheel when: event: - push - tag depends_on: - test2.7 - test3.5 - test3.6 - test3.7 - name: checksum image: alpine pull: always commands: - apk add --no-cache coreutils # exclude files # - sha256sum -b files/!(*.out) > CHECKSUMFILE - sha256sum -b dist/* > sha256sum.txt when: event: - push - tag depends_on: - test2.7 - test3.5 - test3.6 - test3.7 - name: gpg-sign image: plugins/gpgsign:1 pull: always settings: key: from_secret: gpgsign_key passphrase: from_secret: gpgsign_passphrase detach_sign: true files: - dist/* when: event: - push - tag depends_on: - test2.7 - test3.5 - test3.6 - test3.7 - name: publish image: plugins/github-release settings: api_key: from_secret: github_token files: - dist/* - sha256sum.txt when: event: - tag depends_on: - test2.7 - test3.5 - test3.6 - test3.7 - name: pypi_publish image: xoxys/drone-pypi:0.1.0 pull: always settings: username: from_secret: pypi_username password: from_secret: pypi_password repository: https://upload.pypi.org/legacy/ skip_build: true when: event: - tag depends_on: - test2.7 - test3.5 - test3.6 - test3.7