---
pypi-publish:
  stage: publish
  image: ${CI_REGISTRY}/cubicweb/dockerfiles/python-logilab:latest
  tags:
    - publish
    - pypi-publish
  rules:
    - if: '$CI_MERGE_REQUEST_ID'
      when: never
    - if: '$CI_COMMIT_TAG'
      when: on_success
  script:
    - tox -e pypi-publish
