From 092f8783ff81c765205021b34c25c5cdd6a9e4f7 Mon Sep 17 00:00:00 2001 From: Craig Gumbley Date: Thu, 23 Oct 2025 14:19:33 +0100 Subject: [PATCH] winget: automatically publish releases Adds a new GitHub action that automates the publishing of new winget manifests. The workflow is triggered when a release is published and requires a repository secret to be set that has public repo access. --- .github/workflows/winget.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 .github/workflows/winget.yml diff --git a/.github/workflows/winget.yml b/.github/workflows/winget.yml new file mode 100644 index 00000000..2b3a5bce --- /dev/null +++ b/.github/workflows/winget.yml @@ -0,0 +1,24 @@ +name: winget + +on: + release: + types: [published] + +env: + WINGET_CREATE_GITHUB_TOKEN: ${{ secrets.WINGET_TOKEN }} + +jobs: + publish: + runs-on: windows-latest + steps: + - name: publish + run: | + $Release = '${{ toJSON(github.event.release) }}' | ConvertFrom-Json + $Version = $Release.tag_name + $PackageId = "Docker.Cagent" + $Urls = @( + "https://github.com/docker/cagent/releases/download/$Version/cagent-windows-amd64.exe|amd64", + "https://github.com/docker/cagent/releases/download/$Version/cagent-windows-arm64.exe|arm64" + ) + & curl.exe -JLO https://aka.ms/wingetcreate/latest + & .\wingetcreate.exe update $PackageId -s -v $Version -u $Urls