سؤال

I've followed these instructions to use Travis to push my gem to Rubygems whenever I tag a release, but it doesn't seem to be working. Travis runs git fetch --tags after a successful build, but I get no output after that(despite the fact that the same command yields a list of tags on my local machine), and my gem remains unpublished.

My .travis.yml file is here:

rvm:
- 1.9.3
- 2.0.0
- 2.1.0
deploy:
  provider: rubygems
  api_key:
    secure: "UZ7kuAfrrDfKSsmWwiPq1kS9jThJPFcxwSEyfH2sRSy4GAqqMp/E3y3Iuqbkh6GX4NFWzPtGImxcZ+9P6yoBf9Sk+N5mfUY2zyRtcjbTYZ00jvBQLgwaAh3dTRu0NXpBchn+87p7bEwV6mo4AFiacy2k/nrLdIMiyTPuqE8a1r4="
  gem: breasal
  on:
    tags: true
    repo: theodi/breasal

And I create a tag like so:

git tag -a v0.0.1 -m "First release on RubyGems"

And I push with git push --tags

This seems to be the right thing to do, but I'm still having no joy. Any ideas?

هل كانت مفيدة؟

المحلول

There is currently a glitch with on: tags: true that the condition is never met and the code will never trigger a deploy. The github issue is here. The issue should be resolved soon, and in the meantime you can use a branch like releases to upload new versions of your gems to rubygems using on:branch.

Update: To fix on:tags, you can do this, as referenced in the above github issue.

 on:
    tags: true
    all_branches: true
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top