The current release infrastructure is built into the project's Makefile. You'll need both curl
and jq
installed to upload releases onto GitHub.
To communicate with the GitHub releases API you'll need a personal access token. It's recommended you name it "Nakama Release Uploads" and store it in a file called .GITHUB_TOKEN
.
To generate a new release with cross-compiled builds for all supported target architectures run make release
. You can find the build output in "build/release/${version}/nakama-${platform}-${arch}"
.
build/release/${version}/
├── nakama-darwin-amd64
│ ├── CHANGELOG.md
│ ├── LICENSE
│ ├── README.md
│ └── nakama
├── nakama-${version}-darwin-amd64.tar.gz
...etc
A release can only be uploaded with the correct personal access token permissions on GitHub and write permissions on the repository.
To upload a release run make relupload TOKEN= TAG=
where TOKEN
is your personal access token and TAG
is the tag which has already been created on GitHub.
make relupload TOKEN="0aaa00119084689a7721a40951aa54a354aaa000" TAG="v0.10.0"
Note This will upload all platforms/arch to a draft release on GitHub.
The development team use these steps to build and upload a release.
-
Update the
CHANGELOG.md
.Make sure to add the relevant
Added
,Changed
,Deprecated
,Removed
,Fixed
, andSecurity
sections as suggested by keep a changelog. -
Update version in
Makefile
and commit. i.e.VERSION := 0.10.0-dev
should becomeVERSION := 0.10.0
.git add Makefile CHANGELOG.md git commit -m "Nakama 0.10.0 release."
-
Tag the release.
Note In source control good semver suggests a
"v"
prefix on a version. It helps group release tags.git tag -a v0.10.0 -m "v0.10.0" git push origin v0.10.0
-
Upload the release.
make relupload TOKEN="gh personal access token" TAG="v0.10.0"
-
Login and access the new draft release on GitHub. Repeat the changelog in the release description. Then publish the release.
-
Create Docker image and push to Docker Hub.
docker login
make docker dockerpush
-
Add new
## [Unreleased]
section to start ofCHANGELOG.md
. Increment and add suffix"-dev"
to version inMakefile
and commit. i.e.VERSION := 0.10.0
should now becomeVERSION := 0.11.0-dev
.git add Makefile CHANGELOG.md git commit -m "Set new development version." git push origin master
The Homebrew package manager for macOS is supported by our releases. The script is maintained in the repository at "install/local/nakama.rb"
. This file is updated after a new release as needed.
The Chocolatey package manager for Windows is supported by our releases. The scripts are maintained in the repository at "install/local/chocolatey/
". These files are updated after a new release as needed.