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.