Contributing

GitFlow workflow, CI and the release process

GitFlow Branching Model

The project uses GitFlow with GitHub Actions for CI/CD.

BranchPurpose
mainReleased code
developDevelopment integration
feature/*New features
hotfix/*Fixes to a release
feature/my-feature
        │
        ▼ (PR)
    develop ──────► auto PR develop → main
        │
        ▼ (merge)
      main ──────► auto tag + release (from VERSION)
        │
        ▼
   hotfix/fix (merge back to develop)

Creating a Feature

git checkout develop
git pull origin develop
git checkout -b feature/my-feature

# Work on your feature...
git add <files>
git commit -m "feat: add my feature"

git push origin feature/my-feature

Then open a Pull Request from feature/my-feature to develop.

Before Opening a PR

Requires Go 1.27+ and golangci-lint v2.

  • make build compiles
  • make test passes
  • golangci-lint run ./... reports 0 issues
  • govulncheck ./... reports no vulnerabilities in called code
  • README updated (and this site, if user-facing behavior changed)
  • VERSION bumped, if the change should produce a release

CI/CD Pipeline

WorkflowTriggerWhat it does
ci.yamlPush to main, develop, feature/**, hotfix/**; PRs to main/developTest (go test, go vet) → Lint (golangci-lint v2) → Security (govulncheck) → Build
auto-pr.yamlPush to developOpens a PR develop → main when develop is ahead
auto-release.yamlPush to main (ignores *.md and docs/**)Reads VERSION, creates tag vX.Y.Z if missing, tests, builds all platforms, publishes a GitHub Release with checksums.txt
release.yamlPush of a v* tagBuilds and publishes a release for a tag pushed by hand

Creating a Release

Releases are automatic: bump VERSION and merge to main.

  1. Bump the version in your branch:

    echo "2.5.0" > VERSION
    git commit -am "release: bump VERSION to 2.5.0"
    
  2. Merge the PR into develop; auto-pr opens develop → main

  3. Merge that PR; auto-release creates tag v2.5.0, builds the 5 binaries and publishes the release

Versions with -rc, -beta or -alpha are marked as pre-releases.

If VERSION matches a tag that already exists, auto-release skips the build (a run of ~10 seconds). A real release takes a few minutes.

Creating a Hotfix

git checkout main
git pull origin main
git checkout -b hotfix/critical-fix

# Fix the issue and bump the patch version
echo "2.4.1" > VERSION
git commit -am "fix: critical bug"

git push origin hotfix/critical-fix

Open a PR to main. After it is merged, bring the fix back to develop:

git checkout develop
git merge main
git push origin develop

Version Format

FormatDescription
2.4.0Stable release
2.5.0-rc.1Release candidate
2.5.0-beta.1Beta release
2.5.0-alpha.1Alpha release

Checking the Version

make version                                  # from the source tree
./build/k8s-provisioner-darwin-arm64 version  # from a binary
k8s-provisioner v2.4.0
  Git Commit: 8894bff
  Build Date: 2026-10-31T12:00:00Z
  Go Version: go1.27.3
  Platform:   darwin/arm64

Commit Messages

The history uses Conventional Commits prefixes: feat:, fix:, docs:, refactor:, build:, ci:, release:.

  • Imperative mood: “add feature”, not “added feature”
  • First line: about 50 characters
  • Body wrapped at 72 characters, explaining why