I would like to use Travis CI for my open-source project. The issue that Travis doesn\'t provide any ways to publish produced artifacts (though, they have this in their futu
So first you have to be sure that you try to deploy release artifacts. So make tag first in Github. To do it manually:
Then in the .travis.yml file add the following configuration. For gradle users
language: java
jdk:
- oraclejdk7
sudo: required
before_install:
- chmod +x gradlew
script:
- ./gradlew clean build -i --continue
deploy:
provider: releases
api_key: ${api_key}
file: "build/libs/Project.jar"
skip_cleanup: true
on:
all_branches: true
tags: true
Here api_key value is Travis Ci environment variable. Which points to Github api_key.
file is the build artifact produced from the build. Which we want to be deployed to gitHub.
on:
all_branches: true
tags: true
is mandatory configuration for tags to be deployed.
No you have to get the api_key from github:
When you trigger new build the artifact will be deployed.