Push github release requirements

I am trying to follow various guides to release a GitHub release, but I am missing important information.

What is required for such a push to work?

This is my .travis.yml

language: java
git:
  submodules: false
deploy:
  provider: releases
  api_key:
    secure: JjpBYKmA8ByMiNEXLQcR...
  file: target/uSkyBlock.jar
  release-number: latest
  skip_cleanup: true
  on:
    tags: true
    repo: rlf/uSkyBlock
    branch: v2.0.0
    all_branches: true
cache:
  directories:
  - $HOME/.m2

      

those. if I want CI to push SNAPSHOT releases, what and what should I not do?

I tried adding or removing suggestion on:tags

and other other efforts, but no matter, when I try to deploy, I get this:

/home/travis/.rvm/gems/ruby-1.9.3-p551/gems/octokit-3.7.0/lib/octokit/response/raise_error.rb:16:in on_complete': GET https://api.github.com/repos/rlf/uSkyBlock/releases/latest: 404 - Not Found // See: https://developer.github.com/v3 (Octokit::NotFound) from /home/travis/.rvm/gems/ruby-1.9.3-p551/gems/faraday-0.9.0/lib/faraday/response.rb:9:in

block when called 'from / home / travis /. rvm / gems / ruby-1.9.3-p551 / gems / faraday-0.9.0 / lib / faraday / response.rb: 57: in on_complete' from /home/travis/.rvm/gems/ruby-1.9.3-p551/gems/faraday-0.9.0/lib/faraday/response.rb:8:in

call 'from /home/travis/.rvm/gems/ruby-1.9.3- p551 / gems / faraday-0.9.0 / lib / faraday / rack_builder.rb: 139: in build_response' from /home/travis/.rvm/gems/ruby-1.9.3-p551/gems/faraday-0.9.0/lib/faraday/connection.rb:377:in

run_request 'from /home/travis/.rvm/gems/ruby-1.9.3-p551/gems/faraday-0.9.0/ lib / faraday / connection.rb: 140: in get' from /home/travis/.rvm/gems/ruby-1.9.3-p551/gems/sawyer-0.6.0/lib/sawyer/agent.rb:94:in

call 'from /home/travis/.rvm/gems/ruby-1.9.3-p551/gems/octokit-3.7.0/lib/octokit/client.rb:339: in request' from /home/travis/.rvm/gems/ruby-1.9.3-p551/gems/octokit-3.7.0/lib/octokit/client.rb:135:in

get 'from /home/travis/.rvm/gems/ruby-1.9.3-p551/gems/octokit-3.7.0/lib/octokit/client/releases.rb:41:in release' from /home/travis/.rvm/gems/ruby-1.9.3-p551/gems/dpl-1.7.8/lib/dpl/provider/releases.rb:105:in

block to push_app' from / home /travis/.rvm/gems/ruby-1.9.3-p551/gems/dpl-1.7.8/lib/dpl/provider/releases.rb:102:ineach' from /home/travis/.rvm/gems/ruby-1.9.3-p551/gems/dpl-1.7.8/lib/dpl/provider/releases.rb:102:in

push_app 'from /home/travis/.rvm/gems/ruby-1.9.3-p551/gems/dpl-1.7.8/lib/dpl/provider.rb:131:in block in deploy' from /home/travis/.rvm/gems/ruby-1.9.3-p551/gems/dpl-1.7.8/lib/dpl/cli.rb:41:in

fold' from /home/travis/.rvm /gems/ruby-1.9.3-p551/gems/dpl-1.7.8/lib/dpl/provider.rb:131:in deploy' from /home/travis/.rvm/gems/ruby-1.9.3-p551/gems/dpl-1.7.8/lib/dpl/cli.rb:32:in

run 'from /home/travis/.rvm/gems/ruby-1.9.3-p551 /gems/dpl-1.7.8/lib/dpl/cli.rb:7:in run' from /home/travis/.rvm/gems/ruby-1.9.3-p551/gems/dpl-1.7.8/bin/dpl:5:in

'from /home/travis/.rvm/gems/ruby-1.9.3-p551/bin/dpl:23:in load' from /home/travis/.rvm/gems/ruby-1.9.3-p551/bin/dpl:23:in

' failed expand

It seems that the deployer releases

can't find my snapshots on GitHub.

So if I want travis to deploy a continuous test release to GitHub - what should I do? What am I missing?

+3


source to share


1 answer


After absolutely no help on these forums and an answer on IRC - here is my solution to the problem.

It is a hybrid between a "conductor" from Travis, and bits and pieces assembled on various related topics.

travis setup releases

      

We will do our best, but something didn't work out for me, and I couldn't get back on track. So the solution was:

a) Find and Install travis-cli

- I managed to do this in my Windows box, although it's easier on Linux (although it's necessary for the above step, there is still something to do).

b) Go to the GitHub settings page under Applications and look for "automatic releases for rlf / uSkyBlock".

c) Recover the new key - and copy it (it will disappear if you don't).



d) Run travis-cli and encrypt the key:

travis encrypt GITHUB_TOKEN=mytokenhere --add

      

e) Use environment variable in .travis.yml

deploy:
  api-key: ${GITHUB_TOKEN}

      

and now it works.

You don't need to mess with Curl or the GitHub API, and you don't need to wait for travis-ci to answer your question.

+1


source







All Articles