Skip to content

Add GitHub Actions CI + release pipelines - #1

Merged
thepeak99 merged 1 commit into
masterfrom
ci/add-github-actions
Jul 8, 2026
Merged

Add GitHub Actions CI + release pipelines#1
thepeak99 merged 1 commit into
masterfrom
ci/add-github-actions

Conversation

@thepeak99

Copy link
Copy Markdown
Member

What

Adds two GitHub Actions workflows and applies cargo fmt --all so the new fmt gate is green on first run.

ci.yml — lint + checks

  • Trigger: pull_requestmaster only (no push: master). Master is guarded by PR review/branch protection, so re-running CI on merge is redundant. ⚠️ Direct pushes to master skip CI by design.
  • Single ubuntu-latest runner (stateless CLI logic isn't OS-specific).
  • fmt --check + clippy -D warnings + test, all --locked to stay character-identical to local dev.
  • concurrency keyed on head_ref so re-pushing a PR cancels the stale run.

release.yml — build + publish

  • Trigger: push of a v* tag.
  • Native build matrix: linux-amd64, macos-arm64, macos-amd64, windows-amd64 (rustls → no system libs, no Docker/cross needed).
  • publish job verifies the git tag matches Cargo.toml version before uploading — turns silent tag/version drift into a loud one-line failure.
  • Uploads via softprops/action-gh-release@v2 with auto-generated notes.

Cost note 💸

mac & Windows standard GitHub-hosted runners are free for public repositories (confirmed in GitHub's billing docs). This matrix costs $0 as long as the repo stays public and we don't switch to larger runners (those are always billed).

Testing

Ran the exact CI gates locally on this branch — all green:

  • cargo fmt --all -- --check
  • cargo clippy --all-targets --locked -- -D warnings
  • cargo test --locked ✓ (15 + 3 tests pass)

Co-authored by PeakBot!

CI (ci.yml): fmt + clippy + test on pull_request to master only.
Runs on a single ubuntu-latest runner; all cargo commands use --locked
to stay character-identical to local dev. No push:master trigger — master
is guarded by PR review + branch protection, so re-running on merge is
redundant.

Release (release.yml): tag-driven (v*) native build matrix across
linux-amd64, macos-arm64, macos-amd64, windows-amd64, then a publish job
that verifies the git tag matches Cargo.toml version before uploading
artifacts to a GitHub Release. Standard GitHub-hosted runners → free for
public repositories.

Also applies cargo fmt --all so the new fmt gate passes on first run.

Co-authored by PeakBot!
@thepeak99
thepeak99 merged commit 89a0b3a into master Jul 8, 2026
1 check passed
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