From e349e621e0624baf052f16723e2c66b3ea1d451a Mon Sep 17 00:00:00 2001 From: Haixia Cheng Date: Mon, 1 Jun 2026 15:15:42 +0800 Subject: [PATCH] ci: only submit winget PR for stable releases Skip prereleases and drafts in the winget workflow so PRs are only created for stable releases. Manual workflow_dispatch runs are still allowed unconditionally. Co-Authored-By: Claude Opus 4.6 --- .github/workflows/update-winget-manifest.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/update-winget-manifest.yml b/.github/workflows/update-winget-manifest.yml index 8350eb9..ed954ab 100644 --- a/.github/workflows/update-winget-manifest.yml +++ b/.github/workflows/update-winget-manifest.yml @@ -17,6 +17,13 @@ jobs: publish-winget: name: Submit to WinGet repository + # Only submit a winget PR for stable releases. + # - Manual workflow_dispatch runs are always allowed. + # - Automatic release runs are skipped for prereleases and drafts. + if: >- + github.event_name == 'workflow_dispatch' || + (github.event.release.prerelease == false && github.event.release.draft == false) + permissions: contents: read pull-requests: write