feat(ci): build and publish a dev exe on every merge (FEAT-DEV-BUILD-CHANNEL) - #109
Merged
Conversation
…CHANNEL) A release was the only thing that ever produced a ctld-tools.exe, so there was nothing to hand a tester between two of them. Every merge into develop now builds a complete exe from that commit and publishes it twice: as an action artifact, and as a floating `dev` pre-release. The second is not redundant — an artifact answers 401 to an anonymous download even on a public repository, and arrives zipped, which is two more steps for a tester already fighting SmartScreen. The `dev` tag does not match `published-v*`, so it never re-triggers the release workflow. merge_CTLD.ps1 takes -VersionSuffix, used by that workflow alone: the commit is stamped into the ctld.VERSION assignment itself, not just the header comment, so --version, the install report and the mission's copy of the engine all name the build a bug report came from. A local build and a release keep the version written in src/CTLD_config.lua. The suffix is restricted to [A-Za-z0-9._-] — it lands inside a Lua string. Documented for developers (workflow.md EN+FR) and, in one sentence, for Mission Makers: take a dev build only when asked. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Reviewer's GuideAdds a CI workflow that builds and publishes a dev ctld-tools.exe on every merge to develop, extends the CTLD merge script to stamp a commit-based suffix into ctld.VERSION, and documents the new dev build channel for both developers and mission makers while updating backlog tickets and lot status. Sequence diagram for the new dev-build CI workflowsequenceDiagram
actor Developer
participant GitHub as GitHub
participant DevBuildWorkflow as dev-build.yml
participant MergeScript as merge_CTLD.ps1
participant PyInstaller as pyinstaller
participant GHCLI as gh
Developer->>GitHub: Merge into develop
GitHub-->>DevBuildWorkflow: Trigger dev-exe job
DevBuildWorkflow->>DevBuildWorkflow: actions/checkout
DevBuildWorkflow->>DevBuildWorkflow: setup-python / setup-node
DevBuildWorkflow->>DevBuildWorkflow: npm ci && npm run build
DevBuildWorkflow->>DevBuildWorkflow: poetry install --without dev --with build
DevBuildWorkflow->>DevBuildWorkflow: Resolve suffix from GITHUB_SHA
DevBuildWorkflow->>MergeScript: merge_CTLD.ps1 -VersionSuffix suffix
MergeScript-->>DevBuildWorkflow: CTLD.lua with ctld.VERSION suffixed
DevBuildWorkflow->>PyInstaller: pyinstaller ... ctld_tools/__main__.py
PyInstaller-->>DevBuildWorkflow: ctld-tools.exe
DevBuildWorkflow->>DevBuildWorkflow: ctld-tools.exe --version (smoke-check)
DevBuildWorkflow->>GitHub: actions/upload-artifact ctld-tools-dev
DevBuildWorkflow->>GHCLI: gh release delete dev
DevBuildWorkflow->>GitHub: git tag -f dev && git push -f origin dev
DevBuildWorkflow->>GHCLI: gh release create dev ctld-tools.exe CTLD.lua
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- The regex-based stamping of
ctld.VERSIONinmerge_CTLD.ps1will blindly append the suffix to any existing value each time it runs; consider making this idempotent (e.g., replacing with$ctldVersionor only stamping when the value matches the base version fromCTLD_config.lua) to avoid double-suffixing on repeated builds. - The dev-build workflow assumes
ghis available onwindows-latest; to avoid future breakage if the runner image changes, consider explicitly installing or validating the GitHub CLI before using it in theRefresh the floating dev pre-releasestep.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- The regex-based stamping of `ctld.VERSION` in `merge_CTLD.ps1` will blindly append the suffix to any existing value each time it runs; consider making this idempotent (e.g., replacing with `$ctldVersion` or only stamping when the value matches the base version from `CTLD_config.lua`) to avoid double-suffixing on repeated builds.
- The dev-build workflow assumes `gh` is available on `windows-latest`; to avoid future breakage if the runner image changes, consider explicitly installing or validating the GitHub CLI before using it in the `Refresh the floating dev pre-release` step.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
A release was the only thing that ever produced a
ctld-tools.exe, so there was nothing to hand a tester between two of them — the gap FullGas ran into.Zip's first idea was a special mode grafting an arbitrary
CTLD.luainto a copy of the exe. It works (verified:2.0.0-rc6with 1.17 MB appended past its archive still runs — the PyInstaller bootloader finds its cookie regardless of trailing bytes) and was dropped anyway: a grafted exe pairs a new engine with the old schema, catalogue and interface, an unsigned exe altered after the build reads as tampered, and--versionwould keep naming the wrong build.build-exealready produces a complete exe from a commit in 2 min 06 s on free public-repo runners. It only lacked a trigger.What changed
.github/workflows/dev-build.yml— on every push todevelop(plus a manual trigger for any branch), builds the frontend, the stamped engine and the exe, then publishes it twice: an action artifact (14 days) and a floatingdevpre-release. The second is not redundant: an artifact answers401to an anonymous download even on a public repo, and arrives zipped. Thedevtag does not matchpublished-v*, so it never re-triggersrelease.yml.merge_CTLD.ps1 -VersionSuffix— stamps the commit into thectld.VERSIONassignment, not just the header comment, so--version, the install report and the mission's copy of the engine all name the build. Local and release builds keep the version written insrc/CTLD_config.lua. The suffix is restricted to[A-Za-z0-9._-]: it lands inside a Lua string literal.workflow.{md,fr.md}for developers; one sentence inctld-tools.{md,fr.md}telling Mission Makers to take a dev build only when asked.Verified locally
A plain rebuild restores
2.0.0-rc6byte for byte.configVersionis a separate value, so version-gap detection is untouched.Ticket 01's acceptance cannot be checked before this merges — GitHub only runs a workflow from the default flow. Its first run will be this merge; the ticket says so rather than pretending otherwise.
Note:
CTLD.luais attached to thedevpre-release alongside the exe, which the ticket did not ask for — useful for anyone wiring a mission by hand, and free.🤖 Generated with Claude Code
Summary by Sourcery
Introduce a dev build workflow that produces and publishes a tagged ctld-tools.exe on each merge to develop, and ensure dev builds embed their originating commit in the engine version while clarifying the dev channel in docs and backlog.
New Features:
Enhancements:
CI:
Documentation:
Chores: