Skip to content

Add Blacksmith Switch build and release CI - #29

Merged
capy-ai[bot] merged 3 commits into
mainfrom
capy/add-blacksmith-switch-build
Aug 11, 2026
Merged

Add Blacksmith Switch build and release CI#29
capy-ai[bot] merged 3 commits into
mainfrom
capy/add-blacksmith-switch-build

Conversation

@zortos293

@zortos293 zortos293 commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add a Blacksmith-backed workflow that builds and packages the Switch NRO on pull requests and automatically publishes each main build to GitHub Releases
  • derive the next patch version from the latest stable GitHub release, then inject that version into the app UI, shortcut metadata, and NRO metadata
  • generate GitHub release notes from changes since the previous release and safely reuse a release version when a failed run is retried
  • make clean devkitA64 builds reliable by building libpeer dependencies first and preserving Borealis vendored-header precedence
  • add Linux release packaging and version helpers alongside the existing PowerShell tooling

Verification

  • latest live release v0.0.6 resolved to 0.0.7; an existing-release retry resolved back to its original version
  • clean devkitpro/devkita64:20260219 build produced SwitchNOW-0.0.7.nro
  • the app runtime string and both generated NACP files embed 0.0.7, with no stale 0.0.6 runtime version
  • packaged NRO matched the build byte-for-byte; release ZIP passed unzip -t and contained the expected SD-card layout
  • workflow passed actionlint with the documented Blacksmith custom runner labels allowed
  • shell scripts passed syntax and version-policy checks; patch passed git diff --check

Summary by CodeRabbit

  • New Features

    • Added automated Nintendo Switch build and release workflows.
    • Releases now include versioned NRO and ZIP packages with generated notes.
    • Added packaging for binaries, icons, documentation, and installation instructions.
  • Improvements

    • Added configurable versioning and validation to prevent mismatched application and release versions.
    • Improved build reliability by preparing required components explicitly.
    • Added automatic patch-version calculation for releases.
  • Documentation

    • Updated build and release instructions, including CI packaging and version-tag publishing.

@cursor

cursor Bot commented Aug 11, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@coderabbitai

coderabbitai Bot commented Aug 11, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@capy-ai[bot], you've reached your PR review limit, so we couldn't start this review.

Next review available in: 53 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 9f3ccf85-95dc-4bf5-b7c2-7a62e4254b9d

📥 Commits

Reviewing files that changed from the base of the PR and between 1140ca4 and e34dadf.

📒 Files selected for processing (2)
  • .github/actionlint.yaml
  • .github/workflows/switch-release.yml
📝 Walkthrough

Walkthrough

The PR adds Switch release automation. It validates versions, builds dependencies, packages the NRO and supporting files, uploads artifacts, and publishes GitHub releases on successful main pushes.

Changes

Switch release pipeline

Layer / File(s) Summary
Version validation and release packaging
CMakeLists.txt, app/src/app_version.hpp, scripts/read-version.sh, scripts/next-release-version.sh, scripts/package-release.sh
The project validates and embeds the application version. Scripts verify matching versions, compute the next patch version, and create versioned release files and a ZIP archive.
Switch build preparation
scripts/build-switch-msys2.sh, CMakeLists.txt
The build script passes the resolved version to CMake and builds required dependency targets before building SwitchNOW.nro. CMake orders the devkitPro include directory as a system include.
GitHub Actions release workflow
.github/workflows/switch-release.yml, README.md
The workflow resolves versions, builds and packages artifacts, uploads the NRO and ZIP files, and publishes releases on successful main pushes. The README documents local packaging and the release workflow.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Sequence Diagram(s)

sequenceDiagram
  participant GitHubActions
  participant VersionScripts
  participant SwitchBuild
  participant package-release.sh
  participant GitHubRelease
  GitHubActions->>VersionScripts: Resolve release version
  GitHubActions->>SwitchBuild: Build SwitchNOW.nro
  SwitchBuild->>package-release.sh: Package versioned release files
  package-release.sh->>GitHubActions: Upload NRO and ZIP artifacts
  GitHubActions->>GitHubRelease: Publish release assets on main push
Loading
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: adding Blacksmith CI for Switch builds and releases.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch capy/add-blacksmith-switch-build

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/switch-release.yml:
- Line 22: Update the workflow’s actionlint configuration to recognize the
Blacksmith runner labels used by runs-on, including blacksmith-4vcpu-ubuntu-2404
and the other Blacksmith label in this workflow. Ensure CI loads this
runner-label configuration when validating the workflow.
- Around line 68-78: Pin the release-job actions to the specified immutable
commit SHAs: update actions/download-artifact in the “Download build artifact”
step to d3f86a106a0bac45b974a628896c90dbdf5c8093 and softprops/action-gh-release
in the “Publish release with generated notes” step to
3bb12739c298aeb8a4eeaf626c5b8d85266b0e65, preserving their existing
configuration.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 6da00c85-b18e-434e-97bd-bc3493385def

📥 Commits

Reviewing files that changed from the base of the PR and between 615dbb3 and 2642645.

📒 Files selected for processing (6)
  • .github/workflows/switch-release.yml
  • CMakeLists.txt
  • README.md
  • scripts/build-switch-msys2.sh
  • scripts/package-release.sh
  • scripts/read-version.sh

Comment thread .github/workflows/switch-release.yml
Comment thread .github/workflows/switch-release.yml Outdated

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/switch-release.yml:
- Around line 42-43: Use app/src/app_version.hpp as the sole runtime version
source: update app/src/app_version.hpp lines 3-10 and synchronize the required
CMake, packaging, README, and installer metadata. In
.github/workflows/switch-release.yml lines 42-43, resolve the checked-in version
via scripts/read-version.sh and fail unless the selected release tag matches it;
use that validated value for build/package steps at lines 68-72 and release
tag/name publication at lines 102-104. In CMakeLists.txt lines 12-16 and 75-80,
derive or validate metadata from the canonical header and prevent any
independently generated workflow value from replacing the runtime version.
- Line 53: Update the workflow’s container image reference from the mutable
devkitA64 tag to the specified sha256 digest, preserving the existing
devkitpro/devkita64 image.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 28e54197-b57e-4a7e-9a7b-247ea0a34ce4

📥 Commits

Reviewing files that changed from the base of the PR and between 2642645 and 1140ca4.

📒 Files selected for processing (7)
  • .github/workflows/switch-release.yml
  • CMakeLists.txt
  • README.md
  • app/src/app_version.hpp
  • scripts/build-switch-msys2.sh
  • scripts/next-release-version.sh
  • scripts/read-version.sh
🚧 Files skipped from review as they are similar to previous changes (3)
  • scripts/read-version.sh
  • scripts/build-switch-msys2.sh
  • README.md

Comment thread .github/workflows/switch-release.yml
Comment thread .github/workflows/switch-release.yml Outdated
@capy-ai
capy-ai Bot merged commit a221db1 into main Aug 11, 2026
4 checks 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