From 06d3751b220c5a71d22ca7654572f0d5775eb51e Mon Sep 17 00:00:00 2001 From: jovnc <95868357+jovnc@users.noreply.github.com> Date: Sun, 8 Mar 2026 12:59:58 +0800 Subject: [PATCH 1/2] Add winget-publish action in publish.yml --- .github/workflows/publish.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 88edd1f..07fe1c0 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -395,6 +395,21 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + winget-publish: + needs: [prepare, windows] + if: needs.prepare.outputs.should_publish == 'true' + + runs-on: windows-latest + + steps: + - name: Submit to WinGet + uses: vedantmgoyal9/winget-releaser@v2 + with: + identifier: GitMastery.GitMastery + version: ${{ needs.prepare.outputs.version_number }} + token: ${{ secrets.ORG_PAT }} + installers-regex: '\.exe$' + macos-build: needs: prepare if: needs.prepare.outputs.should_publish == 'true' From be8710bd9cba4149a133104bef602595b434b210 Mon Sep 17 00:00:00 2001 From: jovnc <95868357+jovnc@users.noreply.github.com> Date: Sun, 8 Mar 2026 13:16:06 +0800 Subject: [PATCH 2/2] Minimise permissions for winget action --- .github/workflows/publish.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 07fe1c0..20b60cd 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -401,6 +401,9 @@ jobs: runs-on: windows-latest + permissions: + contents: read + steps: - name: Submit to WinGet uses: vedantmgoyal9/winget-releaser@v2