From 66e83f3e1807199fb5828277f93bacd4e010e2a4 Mon Sep 17 00:00:00 2001 From: Moaid Hathot Date: Sat, 20 Jul 2024 01:48:52 -0700 Subject: [PATCH] feat: add Winget publishes to CI/CD (#1299) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: 三咲雅 · Misaki Masa --- .github/workflows/{release.yml => draft.yml} | 6 +++--- .github/workflows/publish.yml | 20 ++++++++++++++++++++ 2 files changed, 23 insertions(+), 3 deletions(-) rename .github/workflows/{release.yml => draft.yml} (98%) create mode 100644 .github/workflows/publish.yml diff --git a/.github/workflows/release.yml b/.github/workflows/draft.yml similarity index 98% rename from .github/workflows/release.yml rename to .github/workflows/draft.yml index 29eee19e..e15aa1fc 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/draft.yml @@ -1,4 +1,4 @@ -name: Release +name: Draft on: push: @@ -126,7 +126,7 @@ jobs: name: yazi-${{ matrix.target }}.snap path: yazi-${{ matrix.target }}.snap - release: + draft: permissions: contents: write runs-on: ubuntu-latest @@ -136,7 +136,7 @@ jobs: with: merge-multiple: true - - name: Release + - name: Draft uses: softprops/action-gh-release@v1 if: startsWith(github.ref, 'refs/tags/') with: diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 00000000..48d0051f --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,20 @@ +name: Publish + +on: + release: + types: [published] + +jobs: + winget: + runs-on: ubuntu-latest + steps: + - uses: actions/download-artifact@v4 + with: + merge-multiple: true + + - name: Publish to Winget + uses: vedantmgoyal9/winget-releaser@main + with: + identifier: sxyazi.yazi + installers-regex: 'yazi-(x86_64|aarch64)-pc-windows-msvc\.zip$' + token: ${{ secrets.WINGET_TOKEN }}