Creating GitHub Releases for Multi-git
Explore how to automate creating GitHub releases for Go command-line programs by tagging commits, using GitHub Actions workflows, and uploading cross-compiled binaries. Understand how to implement semantic versioning tags and manage multi-platform release assets effectively.
We'll cover the following...
Creating releases with GitHub Actions
For the purpose of self-updating, we will create official releases when a particular commit is tagged. A good naming convention is to use semantic versioning tags with
When you are happy with a particular commit you can tag it like so:
git tag v0.8.18
Pushing the tag is as simple as:
git push --tags
This will trigger the Create Release workflow in on-tag-push.yml. Let’s review it piece by piece. It is triggered by tags that start with lowercase v. This means that you can have additional tags that will not trigger a release.
on:
push:
# Sequence of patterns matched against refs/tags
tags:
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
name: Create Release
Next, in the jobs ...