From 480b0f0a172e1ec817a98fba09296588a76ddc4d Mon Sep 17 00:00:00 2001 From: "Grigorii K. Shartsev" Date: Mon, 23 Dec 2024 13:23:33 +0100 Subject: [PATCH] build(ci): add publish-winget Signed-off-by: Grigorii K. Shartsev --- .github/workflows/publish-winget.yml | 29 ++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .github/workflows/publish-winget.yml diff --git a/.github/workflows/publish-winget.yml b/.github/workflows/publish-winget.yml new file mode 100644 index 00000000..9e35637a --- /dev/null +++ b/.github/workflows/publish-winget.yml @@ -0,0 +1,29 @@ +name: Publish to winget + +on: + workflow_dispatch: + inputs: + tag_name: + description: 'Released tag to publish' + required: true + type: string + release_date: + description: 'Release date' + required: true + type: string + default: '(Get-Date -Format "yyyy-MM-dd")' + +jobs: + winget: + name: Publish to winget + runs-on: windows-latest + steps: + - name: Install wingetcreate + run: | + iwr https://aka.ms/wingetcreate/latest -OutFile wingetcreate.exe + - name: Update manifest and publish + run: | + $githubToken = "${{ secrets.WINGET_GITHUB_TOKEN }}" + $url = "https://github.com/nextcloud-releases/talk-desktop/releases/download/${{ $inputs.tag_name }}/Nextcloud.Talk-windows-x64.exe" + $version = $inputs.tag_name.Trim("v") + .\wingetcreate.exe update Nextcloud.Talk --version $version --urls "$url" --release-date ${{ $inputs.release_date }} --submit --token $githubToken