From 5b7820ae8770c951ef355ae5feeb88e1aa6d2c3e Mon Sep 17 00:00:00 2001 From: RubyJ Date: Tue, 17 Mar 2026 00:26:02 -0400 Subject: [PATCH] docs: update CI/CD documentation to reflect split ci and release workflows --- AGENTS.md | 16 ++++++++++++---- README.md | 6 ++++-- 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index ad801ab..a894f66 100755 --- a/AGENTS.md +++ b/AGENTS.md @@ -12,16 +12,24 @@ The addon is split into modular components, sharing a single private namespace ( - `UI.lua`: Handles rendering the main tracker window, row layouts (grid vs vertical), and the per-frame `OnUpdate` timer loop. - `Settings.lua`: Implements the in-game options panel (Escape -> Options -> AddOns) using the modern `Settings` API. Handles SavedVariables overrides. - `Core.lua`: The bootstrap file. Handles `ADDON_LOADED`, slash commands (`/cdt`), and initializes the UI and Settings. -- `.github/workflows/release.yml`: GitHub Actions CI/CD workflow (see CI/CD section below). +- `.github/workflows/ci.yml`: Luacheck lint workflow — runs on push to `main` and all PRs. +- `.github/workflows/release.yml`: Packaging and GitHub Release workflow — runs on `v*` tag push. +- `.github/pull_request_template.md`: PR template with WoW-specific checklist. - `.luacheckrc`: Luacheck static analysis configuration. - `.pkgmeta`: BigWigs packager metadata for release packaging. ## 🔁 CI/CD The project uses GitHub Actions for linting and release packaging. -### Workflow (`.github/workflows/release.yml`) -- **Push to `main`:** Runs `luacheck` on all Lua files via `nebularg/actions-luacheck@v1`. -- **Push a `v*` tag:** Runs luacheck, then runs `BigWigsMods/packager@v2` which creates a GitHub Release with the addon zip attached. Uses the built-in `GITHUB_TOKEN` — no additional secrets required. +### Workflows +Two separate workflow files handle CI and releases: + +**`.github/workflows/ci.yml`** — triggers on push to `main` and on all pull requests: +- Runs `luacheck` on all Lua files via `nebularg/actions-luacheck@v1`. + +**`.github/workflows/release.yml`** — triggers on `v*` tag push only: +- Runs luacheck as a gate, then runs `BigWigsMods/packager@v2` to package the addon and create a GitHub Release with the zip attached. +- Uses `permissions: contents: write` so the built-in `GITHUB_TOKEN` can publish releases — no additional secrets required. ### Luacheck (`.luacheckrc`) - `std = "lua51"` covers standard Lua globals. diff --git a/README.md b/README.md index 597aa42..540abb6 100755 --- a/README.md +++ b/README.md @@ -82,7 +82,9 @@ CooldownTracker/ ├── UI.lua — Frame, row widgets, timer rendering ├── Settings.lua — In-game options panel ├── Core.lua — Init, events, slash commands -├── .github/workflows/release.yml — CI: luacheck on push, package+release on tag +├── .github/workflows/ci.yml — Luacheck on push to main and all PRs +├── .github/workflows/release.yml — Package and publish release on version tag +├── .github/pull_request_template.md — PR checklist template ├── .luacheckrc — Luacheck config (WoW globals whitelist) ├── .pkgmeta — BigWigs packager metadata ├── AGENTS.md — AI agent coding guidelines @@ -93,7 +95,7 @@ CooldownTracker/ Releases are built automatically by GitHub Actions using the [BigWigs packager](https://github.com/BigWigsMods/packager). -- **Push to `main`** — runs [luacheck](https://github.com/mpeterv/luacheck) static analysis on all Lua files. +- **Pull request or push to `main`** — runs [luacheck](https://github.com/mpeterv/luacheck) static analysis on all Lua files. - **Push a version tag** — runs luacheck, packages the addon, and publishes a GitHub Release with a downloadable zip. To ship a release: