Hello,
I’m new to Travis and I try to setup a CD for my Python project, but I’m facing several problems.
Problems:
- “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. - During every build process, it creates five releases on Github, not one.
- The created releases are empty due to problem number 1.
My travis.yml file:
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?