ci: ship the raw exe as a portable download, drop the CI input name - #452
Conversation
…nput After building the installers, re-publish the Delphi exe as PasClaw-<ver>-<arch>-portable.exe and delete the raw PasClaw-<arch>.exe upload name, so the finished release lists intentional downloads (setup + portable) instead of the CI input binary. The download step now falls back to the portable asset when the raw name is absent, so re-running the packaging workflow still works after the rename. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LGQKz579j1ZnDRwmr6h1V6
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f148026dc3
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| Copy-Item $local $portable -Force | ||
| gh release upload $tag $portable --clobber | ||
| # Drop the raw input name (ignore if it wasn't attached, e.g. a re-run). | ||
| gh release delete-asset $tag "PasClaw-$arch.exe" --yes 2>$null |
There was a problem hiding this comment.
Ignore the expected delete-asset miss on reruns
When the workflow is re-run after this step has already renamed the assets, the raw PasClaw-$arch.exe asset no longer exists, and gh release delete-asset treats that as an error; redirecting stderr does not reset $LASTEXITCODE. In this checked shell: pwsh workflow, GitHub Actions appends exit $LASTEXITCODE, so a successful portable --clobber upload followed by this expected miss still makes the step fail, breaking the advertised re-run fallback path. Query before deleting or explicitly clear/ignore the exit code for the expected not-found case.
Useful? React with 👍 / 👎.
…et misses Two fixes to the windows-installers job: - delete-asset exit code (Codex P2 on FMXExpress#452): on a re-run the raw PasClaw-<arch>.exe was already renamed away, so `gh release delete-asset` errored; `2>$null` hides the message but not $LASTEXITCODE, and a checked pwsh step in Actions fails on it -- breaking the advertised re-run path. Snapshot the asset list first and only delete when the raw name is actually present. The download step got the same treatment (list once, act only on names that exist) so a single-arch release no longer trips over the missing arch's download. - Ship the portable as a zip: PasClaw-<ver>-<arch>-portable.zip (holding PasClaw.exe) instead of a bare .exe -- friendlier to browsers/AV. The download-step fallback now extracts the exe from that zip on re-runs. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LGQKz579j1ZnDRwmr6h1V6
Why
Right now a finished release lists the two raw
PasClaw-x64.exe/PasClaw-x86.exe(the binaries you attach for CI to package) next to the installers — redundant and confusing. But since the Delphi build is self-contained, each raw exe is a genuinely useful no-installer / portable PasClaw.What
After the installers are built, the
windows-installersjob now:PasClaw-<version>-x64-portable.exe(and-x86-).PasClaw-x64.exe/PasClaw-x86.exeupload name.So a finished release lists intentional downloads only:
Re-run safety
The download step now prefers the raw upload name but falls back to the portable asset if it's gone, so re-running the packaging workflow still works after the rename (no need to re-attach the exe).
Applying to v0.1.3
The current v0.1.3 release still shows the raw exes. Once this merges, re-run Release artifacts → Run workflow → tag
v0.1.3and it'll rename them to-portableand clean up retroactively. I'll also add a "Portable (no installer)" row to the release notes.🤖 Generated with Claude Code
Generated by Claude Code