Release on new tag

I try to build an archive and upload it to the release page on github when i push a tag. However, i can’t see any builds for the tag that i pushed at https://travis-ci.org/rokka-io/rokka-client-php-cli/builds . I do see the build on master, but i pushed that and some minutes later tagged the last master commit and pushed the tag. In a different repository, i see a build for the tag in the list, and then travis-ci generates the archive and uploads it.

In settings, i have no build types disabled.
My configuration is https://github.com/rokka-io/rokka-client-php-cli/blob/master/.travis.yml (i hope that the matrix & jobs parts can be in the config together like this)

See https://travis-ci.org/rokka-io/rokka-client-php-cli/requests

You are allowing builds on master and those matching /^\d+\.\d+$/. The tag 1.9.0 does not match it. Maybe you meant /^\d(\.\d+)+$/ or similar.

1 Like

thanks a ton! now i feel stupid :man_facepalming:

We’ve all done it. It’s good to have a second set of eyes. :slight_smile:

hm, now i get a deploy build, but it does not do the actual release it is supposed to do. https://travis-ci.org/rokka-io/rokka-client-php-cli/jobs/642965873
the before_deploy step seems not being executed.

looking at the parsed configuration at https://travis-ci.org/rokka-io/rokka-client-php-cli/jobs/642965873/config i notice that it says “true”: {“tags”:true} rather than “on”: {“tags”:true}, but i did that as in the documentation - not sure if this config is necessary, as deploy only happens when we have a tag anyways.

Your definition is not quite right.

jobs:
  include:
    - stage: deploy
      script: skip
      env: COMPOSER_FLAGS=""
      before_deploy: make dist
      deploy: # <=== this
        provider: releases
        api_key:
          secure: XXXXXXX
        file: dist/rokka-cli.phar
        skip_cleanup: true
        on:
          tags: true

There is not deploy defined, so there is no before_deploy, either.

finally made it work, thanks for your help!

i needed to merge the matrix and the jobs section for it to actually work, doing an entry to stages for “test” as well, and label all my other things test.