Travis-CI skips deployment, although Commit is checked

I am new to Travis CI, but I found my way through it using my documents. However, deployment on GitHub releases does not work for me. My file is .travis.ymlas follows:

language: java

branches:
  only:
  - master

notifications:
  email: false

before_deploy:
  - export RELEASE_JAR_FILE=$(ls build/libs/*.jar)
  - echo "Deploying $RELEASE_JAR_FILE to GitHub"

deploy:
  provider: releases
  api_key:
    secure: [key]
  file_glob: true
  file: "${RELEASE_JAR_FILE}"
  skip_cleanup: true
  on:
    repo: [my-repo]
    tags: true
    all_branches: true

Here, as I commit:

$ git add . && git commit -m "my message"
$ git tag 0.1234
$ git push origin --tags
$ git push origin master

After that, Travis creates the assembly and skips the deployment using

Skipping a deployment with the releases provider because this is not a tagged commit

When I open my GitHub repository in my browser, the releases are flagged correctly, but Travis does not detect them as flagged.

- ? , branches: only: master , Travis GitHub on: tags: true. , , , .

+9
3

branches:
    only:
    - master

. Https://github.com/travis-ci/travis-ci/issues/2498#issuecomment-48337712.

, , , , . - https://github.com/travis-ci/travis-ci/issues/new

:

branches.only:

branches:
    only:
    - master
    - /v\d+\.\d+[a-z]/
+10

Travis CI , , , .

TRAVIS_BRANCH: push- , pull, . , , , . , , (TRAVIS_TAG).

: https://docs.travis-ci.com/user/environment-variables/

, . , !

, ( : https://docs.travis-ci.com/user/conditions-v1). - :

stages:
- name: Run tests and build
  if: branch IN (develop, master)
- name: Build and deploy release
  if: tag IS present
jobs:
  include:
  - stage: Build debug
    ...
    script: ...
  - stage: Build and deploy release on tags
    ...
    deploy: ...

travis.yml : https://travis-ci.com/G00fY2/android-ci-testproject/jobs/205348876/config

+2

, @Spain branches ( , ), (git push origin --tags), .

, - , . Travis CI, , :

Fetching: dpl-1.8.14.gem (100%)
Successfully installed dpl-1.8.14
Installing deploy dependencies
dpl.2
Preparing deploy
Logged in as X
Deploying to repo: FOO/BAR
Current tag is: FOOBAR-2015
dpl.3
Deploying application

GitHub "".


Please check: GitHub releases a download on Travis CI for more information.

+1
source

All Articles