Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

making travis-ci zip my project after successful build and push it to github

I´m currently developing a simple java project stored in a github repository with maven to build it and Travis-ci to build it automatically after pushing changes to the repository. My teacher demands that, after an automatic successful build made by travis-ci, I zip the whole project and store it. I´ve already accomplished zipping the project with maven. It brings my zip file to the src/main/resources of my project so I can push the ziip file in my github repository. But when travis creates the zip file, it won´t push the zip to my repository in github. Instead, it generates the zip file to /home/travis/build/my-user/...

That´s what it says in the travis terminal: [INFO] Building zip: /home/travis/build/fabiophillip/calculadoralib/src/main/resources/CalculadoraLib-0.0.1-SNAPSHOT-assembly.zip

How can I make travis-ci push this zip to my github repository instead of this travis folder which I don´t know how to access?

like image 664
Fabio Phillip Rocha Marques Avatar asked Nov 01 '22 23:11

Fabio Phillip Rocha Marques


1 Answers

You could use what I do in this answer (to another question).

you just need to zip up your project and have it be the file that is deployed to github releases on all tagged commits.

To zip the folder:

cd to the folders repository
zip whatyouwanttonamethezip

This copies the current directory, including all subdirectories into the archive file.

That will create this button on the tags/releases tab of your git repo. enter image description here

like image 74
Noah Presler Avatar answered Nov 15 '22 06:11

Noah Presler