* initial development * pipeline * pipeline * pipeline * pipeline * pipeline * pipeline * pipeline * pipeline * pipeline * pipeline * pipeline * pipeline * pipeline * pipeline * ci/cd * ci/cd * ci/cd * ci/cd * ci/cd * ci/cd * ci/cd * pokemon * pokemon * pokemon * pokemon * pokemon * pokemon * improvements * improvements * ci/cd * ci/cd * improvements * improvements * improvements * improvements * improvements * improvements * improvements * improvements * improvements --------- Co-authored-by: sdine <sdine@sdine.com>
4.0 KiB
#documentation #ci-cd #github-actions
CI/CD Guide
This guide defines the CI/CD behavior for Card Collection Manager 3. For the complete versioning policy, including prefix semantics and tag rules, see Versioning Guide. For how the Windows installer artifact is produced and configured, see Windows Installer Guide.
Quick Setup: protect master with the required check Require semver prefix in PR title, then keep release PR titles aligned with the accepted prefixes.
Workflow Map
The repository uses GitHub Actions workflows split by branch intent, with one orchestrator per branch intent:
feature-ci.yml: single workflow run for non-masterpushes; orchestrates Linux and Windows feature builds.feature-linux.yml: reusable Linux build/test/package workflow invoked byfeature-ci.yml.feature-windows.yml: reusable Windows build/test/package workflow invoked byfeature-ci.yml.master-pr-title-guard.yml: validate PR title prefixes for PRs targetingmaster.master-ci.yml: single workflow run on merged PRs tomaster; computes semver, invokes Windows reusable build, then tags/publishes release assets.master-windows.yml: reusable Windows build/test/package workflow invoked bymaster-ci.yml.
Version Flow
Feature branches and master use different version modes because they solve different problems: feature builds need traceability to a commit, while master builds need stable semantic releases.
Feature Branch Builds
On pushes to non-master branches, feature-ci.yml fans out to Linux and Windows reusable workflows. Each platform workflow computes a version string in the format <branch-name>-<short-sha> via scripts/compute_feature_version.sh (for example feature-dark-mode-a1b2c3d).
That version is used in two places:
- artifact file names
- app embedded version via
-DCCM_APP_VERSION=...
Master Releases
When a PR is merged into master, master-ci.yml computes the next semantic version from the latest semver tag and the PR title prefix using scripts/compute_master_semver.sh.
Accepted prefix mapping:
major...-> major bumpminor...-> minor bumpfix...-> patch bumppatch...-> patch bumppath...-> patch bump (accepted alias in current setup)
The resulting version is embedded in the app (CCM_APP_VERSION), used in artifact names, and tagged as v<version>.
Master Merge Guard
PRs targeting master must start with one of the accepted prefixes:
majorminorfixpatchpath
If a title does not match, master-pr-title-guard.yml fails and the PR should not be merged.
Artifact Naming
Feature workflow artifacts (produced by jobs inside feature-ci.yml):
- Windows:
ccm3-windows-<version>.zip,ccm3-windows-installer-<version> - Linux:
ccm3-linux-<version>.zip
Master release artifacts (master-ci.yml, built via master-windows.yml):
ccm3-windows-<semver>.zipccm3-windows-installer-<semver>.exe
Release Procedure
Follow this flow for every release:
- Open a PR to
master. - Use a valid semver prefix in the PR title (
major:,minor:,fix:,patch:, orpath:). - Wait for all required checks to pass.
- Merge the PR.
- Wait for
master-ci.ymlto complete semver computation, Windows build/test, tag creation, and release publishing. - Verify the
vX.Y.Ztag and release assets in GitHub.
Local Build Version Behavior
Outside CI, the app version defaults to ${PROJECT_VERSION} (localbuild) through CCM_APP_VERSION in the top-level CMakeLists.txt. This keeps local binaries easy to distinguish from CI and release outputs.
Troubleshooting
msys2: command not foundin workflow logs: ensure the MSYS2 setup step runs before jobs that useshell: msys2 {0}.Permission deniedwhile linkingccm3.exe: the app is still running; close it and rebuild.- No release after merge: verify the PR merged into
masterand used a valid prefix, then inspectmaster-ci.ymllogs for version/tag/release failures.