This document explains how to create and release new versions of FlutterGuard CLI.
Update the version constant in cmd/root.go:
const Version = "1.1.0" // Update thisCreate or update CHANGELOG.md with new features, fixes, and improvements.
git add cmd/root.go CHANGELOG.md
git commit -m "Release v1.1.0"git tag -a v1.1.0 -m "Release FlutterGuard CLI v1.1.0"
git push origin main
git push origin v1.1.0When you push a tag starting with v, the GitHub Actions workflow automatically:
-
Builds the CLI for multiple platforms:
- Linux (amd64, arm64)
- macOS (amd64, Apple Silicon/arm64)
- Windows (amd64)
-
Creates a GitHub Release with all built binaries attached
-
Makes binaries downloadable from the Releases page
The build workflow creates binaries for:
| Platform | Architecture | Filename |
|---|---|---|
| Linux | x86_64 (amd64) | flutterguard-cli-linux-amd64 |
| Linux | ARM64 | flutterguard-cli-linux-arm64 |
| macOS | Intel (amd64) | flutterguard-cli-darwin-amd64 |
| macOS | Apple Silicon (arm64) | flutterguard-cli-darwin-arm64 |
| Windows | x86_64 (amd64) | flutterguard-cli-windows-amd64.exe |
Check the GitHub Actions logs at: https://github.com/flutterguard/flutterguard-cli/actions
- Verify the tag was pushed:
git push origin <tag-name> - Check that tag starts with
v(e.g.,v1.0.0) - Review workflow logs for errors
If the workflow fails with a message like:
This request has been automatically failed because it uses a deprecated version of actions/upload-artifact: v3
This usually means the tag you pushed points to an older commit where the workflows still used actions/upload-artifact@v3. Fix by retagging the latest commit (which uses @v4):
Option A: Create a new tag (recommended)
git switch main
git pull --ff-only
git tag -a vX.Y.Z -m "Release FlutterGuard CLI vX.Y.Z"
git push origin vX.Y.ZOption B: Move the existing tag to HEAD (force-update)
# If a GitHub Release exists for the tag, delete it in the UI first
git switch main
git pull --ff-only
git tag -fa vX.Y.Z -m "Release FlutterGuard CLI vX.Y.Z"
git push origin vX.Y.Z --forceAfter pushing, monitor the run at your repository’s Actions page.