Goal
Move the plugin to semantic versioning (MAJOR.MINOR.PATCH) and add GitHub Actions to support versioning and release workflow.
Current state
- Version:
INFO has version = 4.9 (two segments only)
- GitHub Actions: No
.github/workflows — no CI or release automation
Semantic versioning
- Format: Use
MAJOR.MINOR.PATCH in INFO (e.g. 4.9.0). Initial semver release can be 4.9.0 (current 4.9 = 4.9.0).
- Policy: Document in README or
docs/VERSIONING.md:
- MAJOR: Incompatible API/behavior changes
- MINOR: New features, backward compatible
- PATCH: Bug fixes, backward compatible
- Single source of truth: Version lives in
INFO; scripts/workflows read it from there.
Cacti-idiomatic GitHub Actions
Align with Cacti core’s workflow so plugin CI matches project norms:
- Triggers:
push and pull_request to develop (and main if used). Same as core.
- Permissions:
contents: read only.
- Concurrency:
group: build-${{ github.event.pull_request.number || github.ref }}, cancel-in-progress: true.
- Env:
COMPOSER_ALLOW_SUPERUSER: 1.
- PHP matrix:
php: ['8.1', '8.2', '8.3', '8.4'], os: [ubuntu-latest], fail-fast: false.
- PHP setup:
shivammathur/setup-php@v2 with:
php-version: ${{ matrix.php }}
extensions: intl, mysql, gd, ldap, gmp, xml, curl, json, mbstring
ini-values: "post_max_size=256M, max_execution_time=60, date.timezone=America/New_York"
- Composer:
composer validate --strict; cache vendor (or include/vendor if aligned with core) with key ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}; composer install.
- Composer scripts: Run
lint, phpcsfixer, phpstan, test where defined (omit if not in plugin’s composer.json).
- Actions:
actions/checkout@v3, actions/cache@v3.
- Workflow file: Optional GPL header at top, same style as core.
Plugin CI should stay lightweight (no full Cacti install): checkout → PHP setup → Composer validate/cache/install → lint → phpcsfixer → phpstan → test. Add a step to validate INFO version is semver.
GitHub Actions to add
- CI — As above; Cacti-style PHP matrix and composer usage.
- Version validation —
INFO version matches ^[0-9]+\.[0-9]+\.[0-9]+(-\S+)?.
- Release workflow — On tag
v*.*.* or manual; create GitHub Release; optional plugin zip; optional tag/INFO match.
- Changelog — Optional: use
CHANGELOG.md for release notes.
Suggested improvements
- Branch protection: require CI to pass.
- One
ci.yml, one release.yml.
Out of scope
- Implementing the workflows (planning/tracking only).
- Changing Cacti core versioning.
References
Goal
Move the plugin to semantic versioning (MAJOR.MINOR.PATCH) and add GitHub Actions to support versioning and release workflow.
Current state
INFOhasversion = 4.9(two segments only).github/workflows— no CI or release automationSemantic versioning
MAJOR.MINOR.PATCHinINFO(e.g.4.9.0). Initial semver release can be4.9.0(current 4.9 = 4.9.0).docs/VERSIONING.md:INFO; scripts/workflows read it from there.Cacti-idiomatic GitHub Actions
Align with Cacti core’s workflow so plugin CI matches project norms:
pushandpull_requesttodevelop(andmainif used). Same as core.contents: readonly.group: build-${{ github.event.pull_request.number || github.ref }},cancel-in-progress: true.COMPOSER_ALLOW_SUPERUSER: 1.php: ['8.1', '8.2', '8.3', '8.4'],os: [ubuntu-latest],fail-fast: false.shivammathur/setup-php@v2with:php-version: ${{ matrix.php }}extensions: intl, mysql, gd, ldap, gmp, xml, curl, json, mbstringini-values: "post_max_size=256M, max_execution_time=60, date.timezone=America/New_York"composer validate --strict; cachevendor(orinclude/vendorif aligned with core) with key${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }};composer install.lint,phpcsfixer,phpstan,testwhere defined (omit if not in plugin’s composer.json).actions/checkout@v3,actions/cache@v3.Plugin CI should stay lightweight (no full Cacti install): checkout → PHP setup → Composer validate/cache/install → lint → phpcsfixer → phpstan → test. Add a step to validate
INFOversion is semver.GitHub Actions to add
INFOversion matches^[0-9]+\.[0-9]+\.[0-9]+(-\S+)?.v*.*.*or manual; create GitHub Release; optional plugin zip; optional tag/INFO match.CHANGELOG.mdfor release notes.Suggested improvements
ci.yml, onerelease.yml.Out of scope
References