Repository navigation
ci: pin wingetcreate in publish-winget and check its SHA-256 - #32387
Merged
Merged
Conversation
Collaborator
Author
|
@codex review |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Lisa-Fiander
approved these changes
Nov 18, 2026
|
Codex Review: Didn't find any major issues. 🚀 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
deansheather
enabled auto-merge (squash)
November 18, 2026 12:35
deansheather
added a commit
to coder/coder-desktop-windows
that referenced
this pull request
Nov 18, 2026
Moves the winget submission into the `release` job, so a release needs
one approval in the `code-signing` environment instead of two
(`code-signing`, then `winget`).
**Before merging:** set a fresh cdrci token as `CDRCI_GITHUB_TOKEN` in
the `code-signing` environment. Today it only exists in `winget`, so the
new step would fail with "winget-token is empty". Retiring the `winget`
environment is a separate coder/github-org-terraform PR, which goes
after this one.
## Changes
- **New `.github/actions/winget/action.yml`:** a local composite action
with the old `winget` job's steps:
- sync cdrci's fork of winget-pkgs;
- install `wingetcreate`;
- submit the updated manifest;
- comment on the winget-pkgs PR.
Other changes in the action:
- It drops the old job's checkout and "Fetch git tags" steps, because
none of the steps read the working tree.
- It downloads `wingetcreate.exe` from the pinned GitHub release
`v1.28.1.0`, not `aka.ms/wingetcreate/latest`, and fails unless its
SHA-256 is `63d980ba…0413`.
- `aka.ms` currently redirects to that same release, so v0.9.1 used this
exact binary.
- Three sources agree on the hash: my own download, GitHub's asset
digest, and Microsoft's `wingetcreate.exe.txt` checksum file.
- The binary carries a Microsoft Authenticode signature.
- Upgrading means changing the version and hash in the action.
coder/coder#32387 pins the same build.
- It checks its inputs up front: the version must be `X.Y.Z` and the
token must be non-empty.
- Inputs reach the scripts through `env:` only, never interpolated into
them.
- **`release.yaml`:**
- The `winget` job is replaced by a final `Submit to winget` step in
`release`. Only that step receives `CDRCI_GITHUB_TOKEN`; the build,
signing and appcast steps never see it.
- The step is last, so a winget failure can't block the GitHub release
or the appcast update. The release just shows as failed.
- `timeout-minutes` goes from 15 to 25. In v0.9.1, `release` took about
5 minutes and `winget` under 3.
- The `outputs:` block is removed; only the `winget` job read it.
- The comments are updated.
## Trade-offs
- **The token now sits in the same environment as the signing setup.**
Anyone who could run code in `code-signing` could also read the cdrci
token. That's acceptable because `code-signing` only runs on `v*` tags,
after a desktop release manager approves.
- **The submission step's `github.token` now has `contents: write`,**
because it shares the `release` job's permissions. The old job had
`contents: read`. The step only uses it for `gh release view`.
## Checks
- `actionlint -shellcheck= .github/workflows/release.yaml`: clean. The
unknown `depot-windows-latest` label warning is gone with the job.
- `zizmor --offline` on both files: no errors or warnings.
-
[v0.9.1](https://github.com/coder/coder-desktop-windows/actions/runs/44297469059)
ran these steps successfully as a separate job and opened
microsoft/winget-pkgs#483234. The commands are unchanged except for the
wingetcreate download and its path, which moves to `$RUNNER_TEMP`.
---
AI disclosure: an AI coding agent (Xum) wrote this change and ran the
checks above at my direction. It stays a draft until I've reviewed it.
deansheather
had a problem deploying
to
docs-preview
November 18, 2026 12:37 — with
GitHub Actions
Failure
This branch had an error being deployed
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Pins the
wingetcreate.exethatpublish-wingetdownloads and checks its SHA-256 before running it. The job runs in therelease-publishenvironment with cdrci's token, so it shouldn't run whateveraka.ms/wingetcreate/latestcurrently points at.Changes (
.github/workflows/release.yaml,publish-wingetjob)wingetcreate.exefrom the GitHub releasev1.28.1.0of microsoft/winget-create, nothttps://aka.ms/wingetcreate/latest.63d980ba79e97042395bd6eb5992c2db9e01e9e7a8a22958a95c288f27310413, and deletes the file..\wingetcreate.exe, so the next step doesn't change.WINGETCREATE_VERSIONandWINGETCREATE_SHA256together. The comment above the step says where to find both.Where the hash comes from
aka.ms/wingetcreate/latestcurrently redirects toreleases/download/v1.28.1.0/wingetcreate.exe, so releases already use this binary.wingetcreate.exe;wingetcreate.exe.txtchecksum file Microsoft publishes in the same release.coder/coder-desktop-windows#196 pins the same version and hash.
Checks
actionlint .github/workflows/release.yaml: clean.zizmor --offline .github/workflows/release.yaml: no errors or warnings, onmainor on this branch.AI disclosure: an AI coding agent (Xum) wrote this change and ran the checks above at my direction. It stays a draft until I've reviewed it.