Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automated build release uploading with travis-ci #269

Closed
wants to merge 1 commit into from
Closed

Automated build release uploading with travis-ci #269

wants to merge 1 commit into from

Conversation

dav-m85
Copy link
Contributor

@dav-m85 dav-m85 commented Oct 28, 2015

As discussed in #268, this is a travis file suitable for building a release tarball.

Administratives steps required for making this run are:

  • Adding travis as a service for the repository,
  • Setting up an env variable "GITHUB_OAUTH_TOKEN" in the repository settings.
  • Tagging a version to trigger the build.

@dav-m85
Copy link
Contributor Author

dav-m85 commented Oct 28, 2015

@theshka @PhrozenByte You may have a look at my fork, gives the following results:

I haven't dealt with gh-pages yet, for this part I'm less confident.

@dav-m85 dav-m85 changed the title Create .travis.yml Automated build release uploading with travis-ci Oct 28, 2015
@theshka
Copy link
Collaborator

theshka commented Oct 28, 2015

This is great, @dav-m85! Thanks for the example file to get us started. I think the PR should be on @PhrozenByte /Pico1.0 branch. We will need to customize it further before committing to master.

At first glance, it appears that you can create another travis.yml in the gh-pages branch, and include it to be built by whitelisting it in the main travis.yml? (http://docs.travis-ci.com/user/customizing-the-build/#Building-Specific-Branches)

@PhrozenByte
Copy link
Collaborator

Works like a charm, thanks @dav-m85!
It took me a trial & error run to understand that it's not necessary (nor possible) to encrypt the GITHUB_OAUTH_TOKEN when using a env variable. Makes sense.

@theshka, can you contact @picocms once again so he/she enables Travis? Step by step:

  • Go to https://travis-ci.org/ and authenticate using GitHub
  • Go to the profile page (https://travis-ci.org/profile/picocms) and enable the Pico repo. The repo may not be visible immediately (there's a yellow "Syncing from GitHub" badge on the top of the page), just refresh after a short period of time, giving Travis the chance to fetch all repos from GitHub
  • Click on the settings icon next to the enable button and enable the "Build only if .travis.yml is present" option
  • Add the environment variable "GITHUB_OAUTH_TOKEN". A token can be created by browsing to https://github.com/settings/tokens and clicking the "Generate new token" button. The only scope to select is "public_repo". Give it a description (e.g. "automatic releases for picocms/Pico") and generate the token. Use the shown token as value for the environment variable.

@theshka, to prevent manual amendments we need to make sure to tag a commit with a nice commit message, e.g.

Pico 1.0.0

* [New] ...
* [Changed] ...

@theshka
Copy link
Collaborator

theshka commented Oct 28, 2015

I've sent @picocms an email with the request and instructions @PhrozenByte, they've been pretty quick to respond in the past, so I'm sure this will be taken care of post-haste.

I will make note of the new commit message format mentally, and somewhere in the docs as well. 👍

Edit: @picocms has now setup travis-ci on their end, let me know if there are any issues with it, and I will reach out again.

@PhrozenByte
Copy link
Collaborator

Great, it works, thanks @theshka, @dav-m85 and @picocms! Travis automatically added the repo to my dasboard and after pushing a commit, Travis automatically start building the PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants