[golang] How to use github for hosting self-updating binaries for your golang projects
- Create a new repo to host your binaries. (Artifactory)
2. Clone the repository on your local machine.
3. It’s a good idea to start with branch named gh-pages
to serve the content.
git checkout -b gh-pages
4. Create a folder for your project, for demonstration purpose, let’s use hello-updater
as it comes as an example with the go-selfupdate project.
5. Add an index.html
file.
6. Once created, commit the file and push the branch to the repository.
7. Validate that everything is working fine by going to the URL: https://<username>.github.io/artifactory/hello-updater/index.html
8. Clone the project: go-selfupdate by running below command:
git clone git@github.com:sanbornm/go-selfupdate.git
9. Install go-selfupdate binary to your system by running below command:
go get -u github.com/sanbornm/go-selfupdate/...