# PyPI deploy provider not allowing deploy of .dev tag?

**URL:** <https://travis-ci.community/t/pypi-deploy-provider-not-allowing-deploy-of-dev-tag/1769>\
**Category:** Python\
**Created:** [January 10, 2019, 11:22am UTC](https://travis-ci.community/t/pypi-deploy-provider-not-allowing-deploy-of-dev-tag/1769 "2019-01-10T11:22:54Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![fricciardi](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/fricciardi/32/942_2.png) [@fricciardi](https://travis-ci.community/u/fricciardi)\
**Post date:** [January 10, 2019, 11:22am UTC](https://travis-ci.community/t/pypi-deploy-provider-not-allowing-deploy-of-dev-tag/1769/1 "2019-01-10T11:22:54Z")

</div>

Hello All,

I’m new at CI and starting to use Travis for it. I’m a Python developer.

My project is [hosted at GitHub](https://github.com/fricciardi/datetime2). What I want to achieve at the end is testing for all commits, deploy at Test PyPI for commits tagged with .dev and deploy to PyPI for commits tagged otherwise.

I am now testing deploy to PYPI, not putting conditions on tags. My .travis.yml file is (skipping comments and like):

```auto
language: python

python:
  - "3.5"
  - "3.6"

install: "pip install ."

script:
  - pytest

deploy:
  - provider: pypi
    server: https://test.pypi.org/legacy/
    user: francescor
    password:
      secure: secure
    distributions: "sdist bdist_wheel"
    skip_existing: true

```

What I get is that after tagging my commit with “0.7.2.dev2”, the deploy job [https://travis-ci.org/fricciardi/datetime2/jobs/477768479](https://travis-ci.org/fricciardi/datetime2/jobs/477768479) ends without deploying, with message “Skipping a deployment with the pypi provider because this branch is not permitted: 0.7.2.dev2”.

It looks to me that the PYPI provider doesn’t like deploy of a .dev version. Am I correct?

If I am, how I can force deploy to PYPI?

Thanks,

Francesco

---

<div class="post-metadata">

**Author:** ![BanzaiMan](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/banzaiman/32/67_2.png) [@BanzaiMan](https://travis-ci.community/u/BanzaiMan)\
**Post date:** [January 10, 2019, 2:22pm UTC](https://travis-ci.community/t/pypi-deploy-provider-not-allowing-deploy-of-dev-tag/1769/2 "2019-01-10T14:22:12Z")

</div>

Please read [https://docs.travis-ci.com/user/deployment/#conditional-releases-with-on](https://docs.travis-ci.com/user/deployment/#conditional-releases-with-on). By default, the only `branch` name allowed to deploy is `master`. If you want t deploy on tags, they need to be explicitly allowed.

---

<div class="post-metadata">

**Author:** ![fricciardi](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/fricciardi/32/942_2.png) [@fricciardi](https://travis-ci.community/u/fricciardi)\
**Post date:** [January 11, 2019, 4:27pm UTC](https://travis-ci.community/t/pypi-deploy-provider-not-allowing-deploy-of-dev-tag/1769/3 "2019-01-11T16:27:41Z")

</div>

Thank you @BanzaiMan.

Thank you for pointing out that I shall have an explicit tags: true condition.

However now Travis does not recognize my commit as tagged ([see job here](https://travis-ci.org/fricciardi/datetime2/jobs/478406476)): message at the end of the job log says: “this is not a tagged commit”. To me it looks that [commit 1da8734](https://github.com/fricciardi/datetime2/commit/1da873435617f20a2d9d428bf1d3bc5565fa446b) has tag 0.7.2.dev7, but may be it is not so.

How shall I tag my commits so that the config file works?

Thanks and best regards,

Francesco

---

<div class="post-metadata">

**Author:** ![BanzaiMan](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/banzaiman/32/67_2.png) [@BanzaiMan](https://travis-ci.community/u/BanzaiMan)\
**Post date:** [January 11, 2019, 4:52pm UTC](https://travis-ci.community/t/pypi-deploy-provider-not-allowing-deploy-of-dev-tag/1769/4 "2019-01-11T16:52:31Z")

</div>

[https://travis-ci.org/fricciardi/datetime2/jobs/478406476](https://travis-ci.org/fricciardi/datetime2/jobs/478406476) was a branch build. The tag build was [https://travis-ci.org/fricciardi/datetime2/builds/478406432](https://travis-ci.org/fricciardi/datetime2/builds/478406432).
