Let's make built and ready to play versions of our games so other people can enjoy them!
We'll do this through a combination of Travis CI and Appveyor (because Windows builds on Travis is hard and I struggled for hours). The steps left for you guys to do should be very simple but there are many so this is optional for the mini games.
YOU ONLY NEED TO DO THIS TROUBLESOME PART ONCE. For future repos you can just copy over your nicely made .yml files and it'll work. You do need to turn on building for those repos on the Travis CI website and the AppVeyor website though.
First make sure your repo has a
.travis.yml and a
.appveyor.yml file. If not, pull from the base code repo. Then open the Travis CI webpage and sign on using your Github account and authorize Travis to build your code. Hit "Activate". Once you do this, you should be on a dashboard where you can see the logs for you Linux and Mac builds. Hit the little "+" next to "My Repositories" and add the repos you want built. Now do the same with the AppVeyor website. This is where your Windows build logs go.
Open up your terminal (or Git Bash or Powershell if you're on Windows) for the next steps, and navigate to the folder of the game you're building.
These are Linux instructions! If you're on Mac use
brew instead of
sudo apt-get. If you're on Windows get Chocolatey and do
(I haven't had time to test this on Mac and Windows yet so apologies for issues please ask on Piazza or email.)
$ sudo apt-get install ruby-full
$ sudo gem install travis
Go on GitHub and open up your user settings. Go to Developer Settings->Personal access tokens->Generate new token. Copy and paste into terminal like so (but don't close that GitHub page yet!!):
$ travis encrypt [your token]
Now copy and paste that massive thing it gives you into
.travis.yml by scrolling all the way down and replacing whatever is in
secure, which is under
api_key, which is under
Now copy your GitHub token AGAIN and paste it into here and then dumping that into
secure, which is under
auth_token, which is under
Ta-Dah! Finally done!
So now we've got these nice YAML files and ready Travis CI and AppVeyor environments, how do we actually trigger a build once your game is done and ready to be played? Open up a terminal or Git Bash or Powershell and follow the following:
$ git add . $ git commit -m "some kinda commit message" $ git tag [some kinda tag you want, like game-builds or game or finished-game etc] $ git push origin [the tag name you just used]
And there we go! Open up Travis and AppVeyor and you should be able to see it building. If you're updating a previous release add a
-f when you call
git tag and a
--force to your
Now on your Git repo, in the "releases" tab you should see nice downloadable packaged versions of your game.