From d25e378b5e327ff4a0ebdc972dc16e3489df86d7 Mon Sep 17 00:00:00 2001 From: Thomas Eizinger Date: Tue, 27 May 2025 08:52:10 +1000 Subject: [PATCH] ci: automatically upload published clients to winget (#9213) This utilizes the https://github.com/vedantmgoyal9/winget-releaser action to automatically submit a PR to the winget repository every time we publish a new version of the GUI / Headless Client. The bot uses the initial manifest added in https://github.com/microsoft/winget-pkgs/pull/259366 and updates the installer link and hash. Resolves: #4729 --- .github/workflows/publish-to-winget.yml | 31 +++++++++++++++++++ website/src/components/Changelog/GUI.tsx | 6 ++++ website/src/components/Changelog/Headless.tsx | 6 ++++ 3 files changed, 43 insertions(+) create mode 100644 .github/workflows/publish-to-winget.yml diff --git a/.github/workflows/publish-to-winget.yml b/.github/workflows/publish-to-winget.yml new file mode 100644 index 000000000..b9d661707 --- /dev/null +++ b/.github/workflows/publish-to-winget.yml @@ -0,0 +1,31 @@ +name: Publish to WinGet +on: + release: + types: + - published + +jobs: + publish_clients: + name: Publish ${{ matrix.identifier }} to winget + runs-on: windows-latest + strategy: + matrix: + include: + - identifier: Firezone.Client.GUI + tag_prefix: gui-client + - identifier: Firezone.Client.Headless + tag_prefix: headless-client + if: ${{ startsWith(github.event.release.name, matrix.tag_prefix) }} + steps: + - id: get-version + run: | + version=${{ github.event.release.name }} + version=${version#${{ matrix.tag_prefix }}-} + echo "version=$version" >> $GITHUB_OUTPUT + shell: bash + - uses: vedantmgoyal9/winget-releaser@3e78d7ff0f525445bca5d6a989d31cdca383372e # main + with: + identifier: ${{ matrix.identifier }} + version: ${{ steps.get-version.outputs.version }} + token: ${{ secrets.WINGET_TOKEN }} + release-notes-url: https://firezone.dev/changelog diff --git a/website/src/components/Changelog/GUI.tsx b/website/src/components/Changelog/GUI.tsx index b0d3a4144..ee6ce1e1b 100644 --- a/website/src/components/Changelog/GUI.tsx +++ b/website/src/components/Changelog/GUI.tsx @@ -40,6 +40,12 @@ export default function GUI({ os }: { os: OS }) { Increases minimum supported CentOS version to 10. )} + {os === OS.Windows && ( + + Adds the Client to the winget repository. You can install it via + `winget install Firezone.Client.GUI`. + + )} diff --git a/website/src/components/Changelog/Headless.tsx b/website/src/components/Changelog/Headless.tsx index d4643da44..7ecca80f5 100644 --- a/website/src/components/Changelog/Headless.tsx +++ b/website/src/components/Changelog/Headless.tsx @@ -29,6 +29,12 @@ export default function Headless({ os }: { os: OS }) { Optimizes network change detection. )} + {os === OS.Windows && ( + + Adds the Client to the winget repository. You can install it via + `winget install Firezone.Client.Headless`. + + )}