Repo for showing how to deploy a Golang app in several packaging system
To create a release first apply a tag and then you can run:
goreleaser init
# edit go releaser
To create a snapshot type:
goreleaser --rm-dist --snapshot --skip-publish
To release the software type:
export GITHUB_TOKEN=<YOUR_TOKEN>
git tag -a "vx.x.x" -m "release x.x.x"
goreleaser release --rm-dist
This chapter shows the several ways the app can be installed.
You can download directly from github, extract the file and place into a folder that is included in your PATH. Go here and download the release and the package that is compatible with your operating system.
You can install on Mac and Linux if you have Homebrew on board:
brew tap mas2020-golang/app-package
brew update
brew info app-package
brew install app-package
# test the application then
app-package
You can download the package for your system from the official releases and run the installation.
For example:
sudo dpkg --install app-package_0.1.0-rc.2_Tux_64-bit.deb
# take a look
sudo dpkg --list | grep app-package
# run the application
app-package
TODO: take a look here for understanding how to create an apt pakcage for distributing on the Debian based distros.
You can install the latest version using the installation script. Run the following:
curl -sL https://raw.githubusercontent.com/mas2020-golang/app-package/main/install.sh | bash
TODO: test install.sh on CentOS and Alpine. TODO: test install.sh on Mac and Ubuntu using sudo and the normal user.