Skip to content
This repository has been archived by the owner on Mar 22, 2023. It is now read-only.
/ application-builder Public archive

Go App Packaging Template for Debian, RedHat, Homebrew and Docker


Notifications You must be signed in to change notification settings


Repository files navigation

Go Lift: Application Builder

Go-App Packaging Template for Debian, RedHat, Homebrew and Docker.

The bits are here, and the readme/howto is coming soon.

In a nutshell (and it's a bit more than a nutshell):

  • Use this template. Name the repo the same as your go app.
  • Edit Most of the config is done here.
    • If you're not sure about something, don't change it.
  • mv .travis.yml travis.yml ; touch .travis.yml ; travis setup releases
    • Accept the defaults. All you need is the secure key.
  • Enable Travis-CI builds for your new repo. Just check the box.
  • Copy the secure api key from .travis.yml to travis.yml, then put it back:
    • Get the indentation right.
    • mv travis.yml .travis.yml
  • With no other changes Travis-CI should build hello-world from your repo.


If you want to push homebrew formula, you'll need to make another repo for your homebrew tap. Mine is named golift/homebrew-mugs. The mugs part can be any word you want, formula is normal, I'm just weird.

  • Add an SSH key to your homebrew repo.
    • Run this: ssh-keygen -t rsa -b 4096 -C "<your_email>" -f github_deploy_key -N ''
    • Make a tar file with this key. tar -cf .secret_files.tar github_deploy_key and encrypt it:
    • travis encrypt-file .secret_files.tar and git add .secret_files.tar.enc
    • Select Add deploy key and upload the contents of here:
    • Update .travis.yml with the $encrypted_XXXXXXXXXXXX_key and $encrypted_XXXXXXXXXXXX_iv values printed by travis encrypt-file .secret-files.tar.
    • Using a tar file in case you want to add more secure files later. Travis only supports one encrypted file per repo.
    • The included .travis.yml file will extract the tar file and use the github_deploy_key file automatically.


If you want to support Docker Builds, create a new Docker Repo, and link it to your new Github Repo. Use this example to setup your build in Docker Cloud. Pretty simple, just add the Tag Auto Build and ENV variables.


Supports uploading to packagecloud! This makes providing your packages to Linux users extremely easy.

To make this work, go to and copy your API key. Head to terminal and run:


That prints out a really long secure line. Copy and paste that into .travis.yml twice, once for each package type (rpm and deb).


  1. Add your Go code, or start hacking on hello-world; it contains quite a bit of boilerplate to get you started.
  2. Update the file.
  3. Refine (it doesn't take much). Make some wiki pages, like Docker.
  4. If your app runs as a service update the package scripts for linux.
  5. Fix the REPO variable in the script.
  6. Clean up .gitignore.


Bitly API integration is included to allow shortening a download link in the homebrew formula. Using bitly gives you download statistics for brew tap installs. There is no other way to obtain this information. A wiki will later be added explaining how to add your bitly API Token.


These repos use this template.