From 34aace29b5f4dd39055816f1036e31ce5424c7cb Mon Sep 17 00:00:00 2001 From: Hazel Granados Date: Sat, 10 Oct 2026 16:29:19 -0500 Subject: [PATCH] ci: submit stable releases to winget --- .github/workflows/winget.yml | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 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 0000000..cdc5519 --- /dev/null +++ b/.github/workflows/winget.yml @@ -0,0 +1,36 @@ +name: winget + +# Runs when a stable release is published (betas don't fire "released"): Komac adds the version to winget-pkgs +# through a pull request from the owner's fork. The first version, 1.1.0, went in by hand, since Komac can only +# update a package winget already has. WINGET_TOKEN is a classic token with public_repo; until it exists, this +# does nothing. +on: + release: + types: [released] + +permissions: + contents: read + +jobs: + submit: + name: Submit to winget + runs-on: ubuntu-latest + env: + KOMAC_VERSION: 2.16.0 + KOMAC_SHA256: 7d2707fa6210f2789a3702de49fbd150b736dbf426ee0b9bc8e098736f9fd82d + steps: + - name: Submit the release + env: + GITHUB_TOKEN: ${{ secrets.WINGET_TOKEN }} + TAG: ${{ github.event.release.tag_name }} + run: | + if [ -z "$GITHUB_TOKEN" ]; then + echo "::notice::WINGET_TOKEN isn't set, so nothing went to winget." + exit 0 + fi + archive="komac-$KOMAC_VERSION-x86_64-unknown-linux-gnu.tar.gz" + curl -fsSL -o "$archive" "https://github.com/russellbanks/Komac/releases/download/v$KOMAC_VERSION/$archive" + echo "$KOMAC_SHA256 $archive" | sha256sum --check + tar -xzf "$archive" komac + ./komac update hazeliscoding.Prompuff --version "${TAG#v}" \ + --urls "https://github.com/$GITHUB_REPOSITORY/releases/download/$TAG/Prompuff-Setup.exe" --submit