Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 12 additions & 4 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand Down
Loading