Skip to content

feat(release): publish the Windows build to winget; update through winget - #163

Merged
7schmiede merged 4 commits into
mainfrom
feat/winget
Oct 21, 2026
Merged

7schmiede merged 4 commits into
mainfrom
feat/winget

Conversation

@7schmiede

Copy link
Copy Markdown
Member

Makes devstack installable with winget install nuetzliches.devstack. This works without code signing (#3); it only means SmartScreen and scanners keep warning until #3 is done.

Release

  • New job winget in release.yml. It fills packaging/winget/ (manifest schema 1.12.0, zip + portable) with the version, the release date and the SHA-256 of the archive the job just built. It checks that devstack.exe sits at the root of the archive, then validates the manifests (winget validate, if the runner has winget).
  • On a tag, wingetcreate submit opens the PR to microsoft/winget-pkgs.
    • wingetcreate v1.12.13.0 (Microsoft, MIT) is pinned by version and SHA-256.
    • The token goes in through WINGET_CREATE_GITHUB_TOKEN, not as an argument, so it stays out of the logs.
    • Without the secret, the job warns and ends.
  • Dry runs (pull_request on packaging/winget/**, dispatch, schedule) only render and validate.

devstack update on a winget install

winget cannot replace a portable binary that is running. devstack's binary is nearly always running: the hub from logon, plus every stack's daemon. I measured this with winget 1.29 and a portable test package (hexyl):

Result
winget upgrade while the exe runs remove_all: Access is denied, version stays (correctly) the old one
move the running exe out of the package folder first, then winget upgrade succeeds, the old process keeps running

So devstack update (and the update button in the dashboard) on a winget install does this:

  1. Moves the running binary to <state>/replaced/. That works on the same volume; a machine-scope install under Program Files would need admin, and then the command says what to do instead.
  2. Runs winget upgrade --id nuetzliches.devstack --exact --silent ….
  3. Moves the old binary back if winget did not put a new one there. That also covers "the catalogue does not have the release yet", which normally lasts a few days after a GitHub release.
  4. Restarts the hub on the new binary, as before.

devstack self uninstall leaves the binary to winget uninstall.

Tested

  • Unit tests: detecting WinGet\Packages and WinGet\Links per user and per machine; \?\ paths.
  • The templates rendered for the real 0.15.0 release (same SHA-256 as its SHA256SUMS) pass winget validate. I ran the manifests step locally for both a tag and a dry run.
  • cargo fmt --check, cargo clippy --workspace --all-targets -- -D warnings, devstack unit tests.
  • Not tested: installing from a local manifest. That needs the LocalManifestFiles setting, which needs admin rights.

Before the first release with this

  • Set the secret WINGET_TOKEN: a classic PAT with public_repo from the account whose fork of winget-pkgs will carry the PRs. wingetcreate creates the fork if it is missing.
  • The first submission of a new package goes through manual review at Microsoft.
  • 0.15.0 is deliberately not submitted: it does not yet know winget in devstack update and would replace its own file behind winget's back.

🤖 Generated with Claude Code

7schmiede and others added 4 commits October 21, 2026 12:41
…nget

Each release renders packaging/winget/ (version, release date, the SHA-256
of the archive it built) and submits it to microsoft/winget-pkgs with
wingetcreate (pinned by version and checksum), from the fork of the
account whose token is the secret WINGET_TOKEN; without it the job warns
and ends. Dry runs render and validate only.

winget cannot replace a portable binary that runs (`remove_all: Access is
denied`, measured with winget 1.29), and devstack's always runs: the hub,
every stack's daemon. So `devstack update` on a devstack winget installed
moves the running binary out of winget's directory, runs `winget upgrade
--id nuetzliches.devstack`, and moves it back when winget put no new one
there (also when winget's catalogue does not have the release yet).
Measured with a portable package: the move-aside lets the upgrade succeed
while the old process keeps running. `self uninstall` leaves the binary to
`winget uninstall`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…s exit code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@7schmiede
7schmiede merged commit 12d9723 into main Oct 21, 2026
@7schmiede 7schmiede mentioned this pull request Oct 21, 2026
@7schmiede
7schmiede deleted the feat/winget branch October 23, 2026 20:53
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