I’m using goreleaser to create binaries for different OS and create release in GitLab. Gorelease will compile the code and based on the config file in your repo create required binaries for different OS and architectures.

It will create dist/ dir in your repo, create .gitignore to avoid pushing dist/ into GitLab and calculate checksums for packages. Text file with checksums will be also deployed to GitLab Release page.

You need to create Access Token with api access in GitLab and export GITLAB_TOKEN environment variable before you run goreleaser.

export GITLAB_TOKEN=<your-token>
goreleaser release
GitLab Release

GitLab Release