Repository navigation
ci: submit to winget from the release job - #196
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. |
|
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
marked this pull request as ready for review
November 18, 2026 12:30
Lisa-Fiander
approved these changes
Nov 18, 2026
ThomasK33
approved these changes
Nov 18, 2026
deansheather
added a commit
to coder/coder
that referenced
this pull request
Nov 18, 2026
Pins the `wingetcreate.exe` that `publish-winget` downloads and checks its SHA-256 before running it. The job runs in the `release-publish` environment with cdrci's token, so it shouldn't run whatever `aka.ms/wingetcreate/latest` currently points at. ## Changes (`.github/workflows/release.yaml`, `publish-winget` job) - Downloads `wingetcreate.exe` from the GitHub release `v1.28.1.0` of microsoft/winget-create, not `https://aka.ms/wingetcreate/latest`. - Fails if the file's SHA-256 isn't `63d980ba79e97042395bd6eb5992c2db9e01e9e7a8a22958a95c288f27310413`, and deletes the file. - Keeps the output path `.\wingetcreate.exe`, so the next step doesn't change. - To upgrade, change `WINGETCREATE_VERSION` and `WINGETCREATE_SHA256` together. The comment above the step says where to find both. ## Where the hash comes from - **Same build as now:** `aka.ms/wingetcreate/latest` currently redirects to `releases/download/v1.28.1.0/wingetcreate.exe`, so releases already use this binary. - **Three sources agree on the hash:** - my own download; - GitHub's asset digest for `wingetcreate.exe`; - the `wingetcreate.exe.txt` checksum file Microsoft publishes in the same release. - **Signature:** the binary carries a Microsoft Authenticode signature. 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, on `main` or 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.
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.
Moves the winget submission into the
releasejob, so a release needs one approval in thecode-signingenvironment instead of two (code-signing, thenwinget).Before merging: set a fresh cdrci token as
CDRCI_GITHUB_TOKENin thecode-signingenvironment. Today it only exists inwinget, so the new step would fail with "winget-token is empty". Retiring thewingetenvironment 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 oldwingetjob's steps:wingetcreate;Other changes in the action:
wingetcreate.exefrom the pinned GitHub releasev1.28.1.0, notaka.ms/wingetcreate/latest, and fails unless its SHA-256 is63d980ba…0413.aka.mscurrently redirects to that same release, so v0.9.1 used this exact binary.wingetcreate.exe.txtchecksum file.X.Y.Zand the token must be non-empty.env:only, never interpolated into them.release.yaml:wingetjob is replaced by a finalSubmit to wingetstep inrelease. Only that step receivesCDRCI_GITHUB_TOKEN; the build, signing and appcast steps never see it.timeout-minutesgoes from 15 to 25. In v0.9.1,releasetook about 5 minutes andwingetunder 3.outputs:block is removed; only thewingetjob read it.Trade-offs
code-signingcould also read the cdrci token. That's acceptable becausecode-signingonly runs onv*tags, after a desktop release manager approves.github.tokennow hascontents: write, because it shares thereleasejob's permissions. The old job hadcontents: read. The step only uses it forgh release view.Checks
actionlint -shellcheck= .github/workflows/release.yaml: clean. The unknowndepot-windows-latestlabel warning is gone with the job.zizmor --offlineon both files: no errors or warnings.$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.