Skip to content

ci: reusable build workflow + per-merge CI + CodeQL#54

Merged
sydneyrenee merged 2 commits into
mainfrom
fix/ci-workflow-repair
May 28, 2026
Merged

ci: reusable build workflow + per-merge CI + CodeQL#54
sydneyrenee merged 2 commits into
mainfrom
fix/ci-workflow-repair

Conversation

@sydneyrenee
Copy link
Copy Markdown
Member

@sydneyrenee sydneyrenee commented May 28, 2026

Summary

  • Extract build-cli + build-tauri from publish.yml into _build.yml as a reusable workflow callable via workflow_call.
  • Add ci.yml: per-merge verification on push to main/dev. No pull_request trigger, so fork code never sees secrets and Actions minutes are not burned on every WIP push.
  • Add codeql.yml: committed CodeQL workflow (replaces default setup). Scans javascript-typescript and actions (catches secret-handling and injection bugs in workflow files; cf. 5569e76).
  • Refactor publish.yml to delegate build jobs to _build.yml via workflow_call, keeping the version and publish jobs in place.
  • Add BUILDING.md covering all build paths (local desktop, local CLI, CI verification, release publish), the reusable-workflow architecture, the 5-target matrix, and the signing/notarization secret chain. CONTRIBUTING.md gets a pointer to it.
  • Fix README.md build-status badge: now points at ci.yml on main (the workflow that actually fires) instead of publish.yml on dev (dispatch-only, never updates).

When _build.yml is called with empty release and tag inputs, tauri-action produces workflow artifacts only with no release attachment. When called with both set (from publish.yml), it attaches to the GitHub release draft. One canonical build definition, two callers.

Cost

Full 5-target matrix (macOS x64/arm64, Windows x64, Linux x64/arm64) on every merge to main/dev. Estimate ~300-500 billable minutes per merge (macOS at 10x multiplier). Frequency bounded by merge rate, not push rate. Swatinem/rust-cache already wired in.

Before merging

  • Disable Code scanning > Default setup in repo Settings, otherwise codeql.yml conflicts.

Test plan

  • CI workflow does not appear in PR checks (only typecheck + test should run on this PR).
  • After merge to main, ci workflow fires and the 5-target Tauri matrix completes.
  • actionlint .github/workflows/*.yml exits clean (verified locally).
  • gh workflow run publish.yml still works end-to-end (manual smoke test after merge).
  • CodeQL alerts appear in Security tab within ~10 min of first successful run.
  • README build-status badge becomes a green check (or red X) after the first ci.yml run on main.

publish.yml had build-cli and build-tauri as the only build pipeline,
gated to release/dispatch on the integration branch. Pull them into
_build.yml as a reusable workflow so the same definition drives both
release publishes and per-merge verification.

- _build.yml: reusable workflow taking version/release/tag inputs.
  Empty release+tag -> tauri-action produces workflow artifacts only;
  set -> attaches to the GitHub release draft.
- ci.yml: post-merge verification on push to main/dev. No pull_request
  trigger, so fork secrets never leak and Actions minutes are not spent
  on every WIP push. workflow_dispatch for ad-hoc re-runs.
- codeql.yml: committed CodeQL workflow replacing default setup. Scans
  javascript-typescript and actions (catches secret-handling/injection
  bugs in workflow files; cf. 5569e76).
- publish.yml: build-cli/build-tauri replaced by a workflow_call to
  _build.yml. Tightens the release-trigger output step (SC2129).

Before merging: disable Code scanning default setup in repo settings,
otherwise codeql.yml will conflict.
@gemini-code-assist
Copy link
Copy Markdown
Contributor

Note

Gemini is unable to generate a review for this pull request due to the file types involved not being currently supported.

Document the three build paths (local desktop, local CLI, CI verification,
release publish), the reusable-workflow architecture, the 5-target matrix,
and the signing/notarization secret chain. Cross-reference APPLE.md for
the macOS notarization deep dive.

- BUILDING.md: new doc covering the full pipeline.
- CONTRIBUTING.md: pointer from the existing "Developing" section to
  BUILDING.md for the deeper story.
- README.md: build status badge now points at ci.yml on main (the
  workflow that actually fires on push), not publish.yml on dev (which
  is dispatch-only and never updates).
@sydneyrenee sydneyrenee merged commit e81b6a7 into main May 28, 2026
8 of 10 checks passed
@sydneyrenee sydneyrenee deleted the fix/ci-workflow-repair branch May 28, 2026 01:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant