# Deployment to Github Releases does not work

**URL:** <https://travis-ci.community/t/deployment-to-github-releases-does-not-work/9576>\
**Category:** Deployment\
**Tags:** python, github-releases\
**Created:** [August 10, 2020, 12:03pm UTC](https://travis-ci.community/t/deployment-to-github-releases-does-not-work/9576 "2020-08-10T12:03:32Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![LostInDarkMath](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/lostindarkmath/32/5033_2.png) [@LostInDarkMath](https://travis-ci.community/u/LostInDarkMath)\
**Post date:** [August 10, 2020, 12:03pm UTC](https://travis-ci.community/t/deployment-to-github-releases-does-not-work/9576/1 "2020-08-10T12:03:32Z")

</div>

Hello,  
I’m new to Travis and I try to setup a CD for my Python project, but I’m facing several problems.

Problems:

1. “Skipping a deployment with the releases provider because this branch is not permitted: 20200810114206-c799054”  
I don’t understand this error message. The last part is the tag and not a branch.
2. During every build process, it creates five releases on Github, not one.
3. The created releases are empty due to problem number 1.

My travis.yml file:

```auto
language: python
python:
  - "3.6" # current default Python on Travis CI
  - "3.7"
  - "3.8"
  - "3.8-dev" # 3.8 development branch
  - "nightly" # nightly build

# command to install dependencies
install:
  - pip install -r requirements.txt
  - pip install wheel

# command to run tests
script:
  - python PythonHelpers/unit_tests/tests_main.py

before_deploy:
  - python setup.py bdist_wheel
  # Set up git user name and tag this commit
  - git config --local user.name "LostInDarkMath"
  - git config --local user.email "32729196+LostInDarkMath@users.noreply.github.com"
  - export TRAVIS_TAG=${TRAVIS_TAG:-$(date +'%Y%m%d%H%M%S')-$(git log --format=%h -1)}
  - git tag $TRAVIS_TAG -a -m "Generated tag from TravisCI for build $TRAVIS_BUILD_NUMBER"
  - echo $GITHUB_TOKEN

deploy:
  provider: releases # use Github pages instead: pages 
  token: $GITHUB_TOKEN
  file: dist/PythonHelpers-1.0.0-py3-none-any.whl
  cleanup: false
  overwrite: true
  on:
     branch: master
  # tags: true

```

Can someone please help me?

---

<div class="post-metadata">

**Author:** ![LostInDarkMath](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/lostindarkmath/32/5033_2.png) [@LostInDarkMath](https://travis-ci.community/u/LostInDarkMath)\
**Post date:** [August 11, 2020, 9:00am UTC](https://travis-ci.community/t/deployment-to-github-releases-does-not-work/9576/2 "2020-08-11T09:00:05Z")

</div>

Somehow helped me out and I want to share with you the solution for my problems:

```auto
language: python
python:
  - "3.6" # current default Python on Travis CI
  - "3.7"
  - "3.8"
  - "3.8-dev" # 3.8 development branch
  - "nightly" # nightly build

install:
  - pip install -r requirements.txt
  - pip install wheel

script:
  - python PythonHelpers/unit_tests/tests_main.py
  - python setup.py bdist_wheel

before_deploy:
  # Set up git user name and tag this commit
  - git config --local user.name "LostInDarkMath"
  - git config --local user.email "32729196+LostInDarkMath@users.noreply.github.com"
  - export TRAVIS_TAG=${TRAVIS_TAG:-$(date +'%Y%m%d%H%M%S')-$(git log --format=%h -1)}
  - git tag $TRAVIS_TAG -a -m "Generated tag from TravisCI for build $TRAVIS_BUILD_NUMBER"
  - echo $GITHUB_TOKEN

deploy:
  provider: releases # use Github pages instead: pages 
  token: $GITHUB_TOKEN
  file_glob: true
  file: dist/*.whl
  skip_cleanup: true
  overwrite: true
  on:
    python: 3.8
    branch: master

```
