Skip to content

build(winget): package okf-render as Coderise.OKF4net.Render - #80

Merged
jchable merged 1 commit into
devfrom
winget-okf-render
Sep 6, 2026
Merged

build(winget): package okf-render as Coderise.OKF4net.Render#80
jchable merged 1 commit into
devfrom
winget-okf-render

Conversation

@jchable

@jchable jchable commented Sep 6, 2026

Copy link
Copy Markdown
Owner

Gives the new okf-render binary its own winget package, mirroring how okf is already published as Coderise.OKF4net.

What ships

  • Three manifest templates for Coderise.OKF4net.Render, with copy that describes this tool rather than repeating the validator's: it installs the okf-render command, points at the okf-render-* zips, and its short description is about static-site generation, not parsing/validating.
  • Generate-Manifests.ps1 gains a -PackageIdentifier parameter and produces either package's manifests, rather than being forked into a second near-identical script.
  • release.yml: the winget-manifests job now generates and attaches both packages' manifests; a new winget-submit-render job mirrors the existing submit job, including its token guard — it skips with a notice unless a WINGET_TOKEN secret exists.

The first submission is manual, on purpose

winget-releaser updates an existing package; it does not create one. So Coderise.OKF4net.Render's first appearance in winget-pkgs has to be submitted by hand — exactly as Coderise.OKF4net was. The new job is deliberately inert until then, and packaging/winget/README.md now says so plainly so nobody expects it to publish a package that does not exist yet. Once the package is live and a token is configured, both packages activate together.

Two traps worth recording

Coderise.OKF4net is a literal string prefix of Coderise.OKF4net.Render. Matching templates by prefix or glob would silently pick up the wrong file. Generation matches by exact filename instead.

installers-regex is per-job, and the two packages' Windows zips live side by side on the same Release. Both regexes are anchored and were verified in both directions — each matches only its own package's two zips and rejects the other's, plus every .tar.gz:

okf-0.6.0-win-x64.zip              okf=true  render=false
okf-render-0.6.0-win-x64.zip       okf=false render=true
okf-0.6.0-linux-x64.tar.gz         okf=false render=false
okf-render-0.6.0-osx-arm64.tar.gz  okf=false render=false

Getting that wrong would submit the wrong binary to Microsoft.

Verified

Both manifest sets generated locally with real-shaped URLs and checked: distinct identifiers, distinct command aliases (okf vs okf-render), correct RelativeFilePath per package, correct URLs. winget validate --manifest (CLI v1.30.130-preview) returned success for both. 1272 tests green, dotnet format clean.

Not verifiable without a real release: an end-to-end CI run of the new job, and installing from a published artifact.

🤖 Generated with Claude Code

…t.Render)

okf-render ships alongside okf but had no winget package of its own. Add a
second package identifier, Coderise.OKF4net.Render, mirroring okf's shape:

- New manifest templates (version/installer/locale) under
  packaging/winget/templates/, describing the static-site generator rather
  than reusing okf's validator copy; installer template nests okf-render.exe
  with the okf-render command alias.
- Generate-Manifests.ps1 gains a -PackageIdentifier parameter so one script
  fills either package's three templates, matched by exact filename (a
  prefix/glob match would wrongly pull Coderise.OKF4net.Render's templates
  in when generating Coderise.OKF4net, since the former string starts with
  the latter).
- release.yml's winget-manifests job now generates and attaches manifests
  for both packages, reading the render zips' own .sha256 sidecars. A new
  winget-submit-render job mirrors winget-submit (same WINGET_TOKEN gate,
  same skip-with-notice behaviour) with its own installers-regex anchored to
  okf-render-<version>-win-*.zip so it cannot match okf's zips, and vice
  versa -- verified in both directions against real archive names and
  against the non-Windows tar.gz names that neither regex should match.
- Docs: packaging/winget/README.md now covers both packages and states
  plainly that Coderise.OKF4net.Render's first winget-pkgs submission must
  still be done by hand (winget-releaser updates an existing package, it
  does not create one). README.md's okf-render section drops the stale
  "not currently packaged for winget" line in favour of the same caveat.

Verified locally: ran Generate-Manifests.ps1 for both packages with
plausible version/URL/SHA256 values, confirmed `winget validate` passes on
both generated manifest sets, and confirmed both installers-regex patterns
against each other's zip names plus .tar.gz names. dotnet test OKF4net.sln
(1272 passed) and dotnet format --verify-no-changes both stay clean.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Copilot AI lite review requested due to automatic review settings September 6, 2026 09:06
@jchable
jchable merged commit a2bae08 into dev Sep 6, 2026
9 checks passed
@jchable
jchable deleted the winget-okf-render branch September 6, 2026 09:08

Copilot AI 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.

🟡 Changes recommended

winget-submit-render can still run (and fail the release workflow) as soon as WINGET_TOKEN is configured, even if the render package is not yet present in winget-pkgs.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Adds a dedicated winget package identity for the okf-render static-site generator and updates the release pipeline/scripts so both okf and okf-render winget manifests can be generated and (eventually) submitted.

Changes:

  • Add winget manifest templates for Coderise.OKF4net.Render (version/defaultLocale/installer).
  • Generalize packaging/winget/Generate-Manifests.ps1 with -PackageIdentifier to generate manifests for either package without duplicating the script.
  • Extend release.yml to generate/attach both packages’ manifests and add a mirrored winget-submit-render job.
File summaries
File Description
README.md Updates user-facing install guidance to mention the new winget package and its manual first submission requirement.
packaging/winget/templates/Coderise.OKF4net.Render.yaml.in Adds the winget “version” manifest template for the render package.
packaging/winget/templates/Coderise.OKF4net.Render.locale.en-US.yaml.in Adds localized metadata (publisher/name/description/tags) for the render package.
packaging/winget/templates/Coderise.OKF4net.Render.installer.yaml.in Adds installer manifest template pointing to okf-render.exe as a portable nested installer.
packaging/winget/README.md Documents the two-package setup, regex separation, and manual first submission for the render package.
packaging/winget/Generate-Manifests.ps1 Adds -PackageIdentifier and switches to exact-filename template selection to avoid prefix collisions.
.github/workflows/release.yml Generates/attaches both manifest sets and adds a winget-submit-render job for automated updates.
Review details
  • Files reviewed: 7/7 changed files
  • Comments generated: 1
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +275 to +285
- name: Check for a winget token
id: gate
env:
WINGET_TOKEN: ${{ secrets.WINGET_TOKEN }}
run: |
if [ -z "$WINGET_TOKEN" ]; then
echo "::notice::No WINGET_TOKEN secret; skipping the winget-pkgs PR. The manifests are attached to the Release -- submit them with \`wingetcreate submit\`."
echo "go=false" >> "$GITHUB_OUTPUT"
else
echo "go=true" >> "$GITHUB_OUTPUT"
fi
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.

3 participants