
Loading…
Set up Travis releases. #496
+28
−6
fwalch
commented
gorhill
commented
Looks nice, thanks. That will save time.
gorhill
commented
When I look up gem, I am told if can be found in two packages: ruby and rubygems. Which one should I install (the smallest for all this to work)?
fwalch
commented
Hm, rubygems, I guess.. which OS are you on?
gorhill
commented
Linux Mint.
fwalch
commented
Well, you can install ruby and see if it has the gem executable (on my OS, this is the case [Arch Linux]). If not, rubygems will probably depend on ruby anyway.
This was referenced
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This page is out of date. Refresh to see the latest.
Showing
with
28 additions
and 6 deletions.
- +16 −0 .travis.yml
- +7 −0 tools/make-chromium.sh
- +5 −6 tools/make-firefox.sh
16
.travis.yml
| @@ -0,0 +1,16 @@ | ||
| +sudo: false | ||
| +env: | ||
| + matrix: | ||
| + - BROWSER=chromium EXT=zip | ||
| + - BROWSER=firefox EXT=xpi | ||
| +script: ./tools/make-${BROWSER}.sh all | ||
| +deploy: | ||
| + provider: releases | ||
| + api_key: | ||
| + secure: TODO: your key here! | ||
| + file: dist/build/uBlock.${BROWSER}.${EXT} | ||
| + skip_cleanup: true | ||
| + on: | ||
| + repo: gorhill/uBlock | ||
| + tags: true | ||
| + all_branches: true |
7
tools/make-chromium.sh
11
tools/make-firefox.sh
You can find the documentation of this feature here. Basically, it would automatically publish XPI (Firefox) and ZIP (Chromium) to a Github release when you create a tag on your repo.
What it does
Here's an overview of how it works: I created a test tag
0.8.5.4-TESTand pushed it. This triggered a build, which in turn created a release at https://github.com/fwalch/uBlock/releases/tag/0.8.5.4-TEST. As you can see, this has the two files for Firefox and Chromium. The commit message of the tagged commit is used as the release description, but you can also edit that later.For ordinary commits (i.e. non-tagged), it of course doesn't create a release. See e.g. this build.
Required steps
If you want to merge this, I think the easiest way is the following (unfortunately it's still a bit lengthy, at least if you never used Travis):
travisRuby gem (gem install travis)travis setup releases. You'll need to log in with your Github username and password. What you answer is not that important, only that you say "yes" when it asks "Encrypt API key?". Copy the value ofapi_key.secureof generated.travis.ymlsomewhere for later..travis.yml.TODO: your key here!in thetravis.ymlwith the encrypted key you got in step 2.2 (similar to fwalch@f160ddf).gorhill/uBlockrepository.The next time you push a tag, Chromium and XPI files will automatically be added to a new release.
I hope you find this useful; if you have any questions, let me know!