tcnksm / ghr

Upload multiple artifacts to GitHub Release in parallel

Home Page:http://tcnksm.github.io/ghr/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

TravisCI gone into infinite loop if ghr --delete used in after_success

popstas opened this issue · comments

I want to upload binaries after each commit to pre-release tag latest. If I used this:

after_success:
  - gox -output "dist/{{.OS}}_{{.Arch}}_{{.Dir}}" -arch="amd64" -os="windows linux darwin"
  - ghr --username popstas --token $GITHUB_TOKEN --replace --delete --prerelease --debug latest dist/

then Travis will begin build latest tag recursively.

I don't think this is a ghr problem, I think this is actually correct/unwanted/wanted behaviour. I got around this by specifying the branches which I wanted TravisCI to build e.g.

branches:
  only:
  - master
  - hotfix
  - release
  - develop
  - /feature.*/

Without this, when the tag is deleted and a new one created, this change is sent to TravisCI and a build starts with the target being the tag name even though the commit hash is one which has already been built, hence the loop begins.