This document explains how to publish a release of cowardly (create a version tag and publish binaries via GitHub Actions).
- Tagging is done manually (or via the GitHub UI). There is no workflow that creates tags for you.
- Releasing is automated: when you push a tag matching
v*, the release workflow runs, builds the binary for each platform, packs each into a.tar.gzwith CHANGELOG.md, LICENSE, and README.md, and creates a GitHub Release with those archives attached.
Use semantic version tags so the workflow picks them up:
v1.0.0— major releasev0.2.1— minor/patch (e.g. pre-1.0)v2.0.0-beta.1— optional pre-release suffix
The workflow triggers on any tag that starts with v (pattern v*).
- Ensure
main(or your default branch) has the changes you want in this release. - Run tests and lint locally:
make test,make lint,make format-check,make lint-yaml. - Optionally update a changelog or version note in the repo.
From your repo root, on the branch you want to release (e.g. main):
Using make bump-version (recommended):
make bump-version # bump patch (e.g. v0.2.3 → v0.2.4)
make bump-version PART=minor # bump minor (e.g. v0.2.3 → v0.3.0)
make bump-version PART=major # bump major (e.g. v0.2.3 → v1.0.0)This reads the latest tag, bumps the version, creates an annotated tag, and pushes it. The release workflow triggers on push.
Manual tagging:
# Create an annotated tag (recommended; stores date and message)
git tag -a v1.0.0 -m "Release v1.0.0"
# Push the tag to the remote
git push origin v1.0.0Lightweight tag (no message):
git tag v1.0.0
git push origin v1.0.0- Go to the Actions tab of the repository and open the release workflow run for your tag.
- The job will:
- Check out the code
- Set up Go (version from
go.mod) - For darwin/amd64 (Intel) and darwin/arm64 (Apple Silicon): build
cowardly, then create a.tar.gzcontaining the executable, CHANGELOG.md, LICENSE, and README.md - Create a GitHub Release for the tag and attach the archives
- Generate release notes from the tag
- Open the Releases page of the repository.
- The new release will appear with the tag name (e.g.
v1.0.0) and two assets:cowardly_v1.0.0_darwin_x86_64.tar.gz(Intel Mac)cowardly_v1.0.0_darwin_arm64.tar.gz(Apple Silicon)
Asset names follow the format cowardly_v{VERSION}_{OS}_{ARCH}.tar.gz (e.g. for future Linux: cowardly_v1.0.0_linux_x86_64.tar.gz). Each archive contains a single top-level directory (e.g. cowardly_v1.0.0_darwin_arm64/) with the cowardly executable, CHANGELOG.md, LICENSE, and README.md inside it.
Users can download and run, e.g. for Apple Silicon:
tar xzf cowardly_v1.0.0_darwin_arm64.tar.gz
cd cowardly_v1.0.0_darwin_arm64
chmod +x cowardly
./cowardly(Or move the cowardly binary to a directory in PATH.)
You can also create a release (and tag) from the GitHub website:
- Go to Releases → Draft a new release.
- Click Choose a tag, type a new tag (e.g.
v1.0.0), and select Create new tag. - Add a title and description if you like.
- Publish the release.
Note: Creating only a tag in the UI (without publishing a release) will still trigger the release workflow, which will then create the release and attach the built archives. So either “publish release” with a new tag or “create tag and push” from the CLI will result in the same automated build and release.
- It does not create tags. You (or the GitHub UI) create the tag; the workflow runs when the tag is pushed.
- It does not run on every push to
main. Only tag pushes matchingv*trigger it. - It only builds for macOS (darwin). Other OS/arch (e.g. Linux, Windows) are not built yet; when added, archives will follow the same naming:
cowardly_v{VERSION}_{OS}_{ARCH}.tar.gzor.zipfor Windows.
- Workflow didn’t run — Ensure the tag was pushed to the same repo (
git push origin v1.0.0). Check the Actions tab for the run. - Release exists but no assets — Check the workflow logs for the "Build and pack" and “Create Release” steps; the job needs
contents: write(already set in the workflow). - Wrong Go version — The workflow uses
go-version-file: go.mod; the Go version ingo.modis used to run the build.
- .github/workflows/release.yml — Release workflow definition
- .github/workflows/README.md — Overview of all workflows