From f1974669dd248dd5089511e45b23c0565712cfd0 Mon Sep 17 00:00:00 2001 From: "Martin Hinshelwood nkdAgility.com" Date: Wed, 20 Dec 2023 10:31:34 +0000 Subject: [PATCH 1/7] Update to add action that published an update to Winget on release --- .github/actions/winget-update/action.yaml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 .github/actions/winget-update/action.yaml diff --git a/.github/actions/winget-update/action.yaml b/.github/actions/winget-update/action.yaml new file mode 100644 index 00000000..e4e3954e --- /dev/null +++ b/.github/actions/winget-update/action.yaml @@ -0,0 +1,18 @@ +name: Submit package to Windows Package Manager Community Repository + +on: + release: + types: [published] + +jobs: + + winget: + name: Publish winget package + runs-on: windows-latest + steps: + - name: Submit package to Windows Package Manager Community Repository + run: | + iwr https://aka.ms/wingetcreate/latest -OutFile wingetcreate.exe + $github = Get-Content '${{ github.event_path }}' | ConvertFrom-Json + $installerUrl = $github.release.assets | Where-Object -Property name -match 'obs-backgroundremoval-*-windows-x64-Installer.exe' | Select -ExpandProperty browser_download_url -First 1 + .\wingetcreate.exe update RoyShilkrot.obs-backgroundremoval -s -v $github.release.tag_name -u $installerUrl -t ${{ secrets.UPDATETHIS_PAT }} \ No newline at end of file From 477bb3ce13d0d763410170cc8fa667d14180aeb6 Mon Sep 17 00:00:00 2001 From: "Martin Hinshelwood nkdAgility.com" Date: Wed, 10 Jan 2024 16:47:05 +0000 Subject: [PATCH 2/7] Added new line at end of file --- .github/actions/winget-update/action.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/actions/winget-update/action.yaml b/.github/actions/winget-update/action.yaml index e4e3954e..2d6f7300 100644 --- a/.github/actions/winget-update/action.yaml +++ b/.github/actions/winget-update/action.yaml @@ -15,4 +15,5 @@ jobs: iwr https://aka.ms/wingetcreate/latest -OutFile wingetcreate.exe $github = Get-Content '${{ github.event_path }}' | ConvertFrom-Json $installerUrl = $github.release.assets | Where-Object -Property name -match 'obs-backgroundremoval-*-windows-x64-Installer.exe' | Select -ExpandProperty browser_download_url -First 1 - .\wingetcreate.exe update RoyShilkrot.obs-backgroundremoval -s -v $github.release.tag_name -u $installerUrl -t ${{ secrets.UPDATETHIS_PAT }} \ No newline at end of file + .\wingetcreate.exe update RoyShilkrot.obs-backgroundremoval -s -v $github.release.tag_name -u $installerUrl -t ${{ secrets.UPDATETHIS_PAT }} + \ No newline at end of file From 1205b8c78f4ccde4c690cd72aa6ed2866b5df002 Mon Sep 17 00:00:00 2001 From: "Martin Hinshelwood nkdAgility.com" Date: Wed, 10 Jan 2024 17:33:26 +0000 Subject: [PATCH 3/7] Update .github/actions/winget-update/action.yaml Co-authored-by: Kaito Udagawa --- .github/actions/winget-update/action.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/actions/winget-update/action.yaml b/.github/actions/winget-update/action.yaml index 2d6f7300..e4e3954e 100644 --- a/.github/actions/winget-update/action.yaml +++ b/.github/actions/winget-update/action.yaml @@ -15,5 +15,4 @@ jobs: iwr https://aka.ms/wingetcreate/latest -OutFile wingetcreate.exe $github = Get-Content '${{ github.event_path }}' | ConvertFrom-Json $installerUrl = $github.release.assets | Where-Object -Property name -match 'obs-backgroundremoval-*-windows-x64-Installer.exe' | Select -ExpandProperty browser_download_url -First 1 - .\wingetcreate.exe update RoyShilkrot.obs-backgroundremoval -s -v $github.release.tag_name -u $installerUrl -t ${{ secrets.UPDATETHIS_PAT }} - \ No newline at end of file + .\wingetcreate.exe update RoyShilkrot.obs-backgroundremoval -s -v $github.release.tag_name -u $installerUrl -t ${{ secrets.UPDATETHIS_PAT }} \ No newline at end of file From 863ba811514fe33fc21af166fa9dab8b377f05ec Mon Sep 17 00:00:00 2001 From: "Martin Hinshelwood nkdAgility.com" Date: Wed, 10 Jan 2024 19:50:31 +0000 Subject: [PATCH 4/7] Move build file to right location --- .../winget-update/action.yaml => workflows/winget-update.yaml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/{actions/winget-update/action.yaml => workflows/winget-update.yaml} (100%) diff --git a/.github/actions/winget-update/action.yaml b/.github/workflows/winget-update.yaml similarity index 100% rename from .github/actions/winget-update/action.yaml rename to .github/workflows/winget-update.yaml From e2c6e12b984c74cdf8b8ef2f3e3e91ceef40944a Mon Sep 17 00:00:00 2001 From: Roy Shilkrot Date: Thu, 18 Jan 2024 15:49:36 -0500 Subject: [PATCH 5/7] Update .github/workflows/winget-update.yaml Co-authored-by: Kaito Udagawa --- .github/workflows/winget-update.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/winget-update.yaml b/.github/workflows/winget-update.yaml index e4e3954e..ad124f87 100644 --- a/.github/workflows/winget-update.yaml +++ b/.github/workflows/winget-update.yaml @@ -15,4 +15,4 @@ jobs: iwr https://aka.ms/wingetcreate/latest -OutFile wingetcreate.exe $github = Get-Content '${{ github.event_path }}' | ConvertFrom-Json $installerUrl = $github.release.assets | Where-Object -Property name -match 'obs-backgroundremoval-*-windows-x64-Installer.exe' | Select -ExpandProperty browser_download_url -First 1 - .\wingetcreate.exe update RoyShilkrot.obs-backgroundremoval -s -v $github.release.tag_name -u $installerUrl -t ${{ secrets.UPDATETHIS_PAT }} \ No newline at end of file + .\wingetcreate.exe update RoyShilkrot.obs-backgroundremoval -s -v $github.release.tag_name -u $installerUrl -t '${{ secrets.GITHUB_PUBLIC_REPO_PAT }}' From 3b5f7c0abe079241ce5cb41b0b765598706c19bd Mon Sep 17 00:00:00 2001 From: Roy Shilkrot Date: Thu, 18 Jan 2024 15:49:48 -0500 Subject: [PATCH 6/7] Update .github/workflows/winget-update.yaml Co-authored-by: Kaito Udagawa --- .github/workflows/winget-update.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/winget-update.yaml b/.github/workflows/winget-update.yaml index ad124f87..4c6619f6 100644 --- a/.github/workflows/winget-update.yaml +++ b/.github/workflows/winget-update.yaml @@ -2,7 +2,8 @@ name: Submit package to Windows Package Manager Community Repository on: release: - types: [published] + types: + - published jobs: From 0e3e5d0dd4732192d67c271abb8098e89d41014c Mon Sep 17 00:00:00 2001 From: Roy Shilkrot Date: Thu, 18 Jan 2024 15:50:52 -0500 Subject: [PATCH 7/7] Update winget-update.yaml --- .github/workflows/winget-update.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/winget-update.yaml b/.github/workflows/winget-update.yaml index 4c6619f6..31e8b96c 100644 --- a/.github/workflows/winget-update.yaml +++ b/.github/workflows/winget-update.yaml @@ -16,4 +16,4 @@ jobs: iwr https://aka.ms/wingetcreate/latest -OutFile wingetcreate.exe $github = Get-Content '${{ github.event_path }}' | ConvertFrom-Json $installerUrl = $github.release.assets | Where-Object -Property name -match 'obs-backgroundremoval-*-windows-x64-Installer.exe' | Select -ExpandProperty browser_download_url -First 1 - .\wingetcreate.exe update RoyShilkrot.obs-backgroundremoval -s -v $github.release.tag_name -u $installerUrl -t '${{ secrets.GITHUB_PUBLIC_REPO_PAT }}' + .\wingetcreate.exe update RoyShilkrot.obs-backgroundremoval -s -v $github.release.tag_name -u $installerUrl -t '${{ secrets.OBS_BGREMOVAL_PUBLIC_REPO_PAT }}'