We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3352cf5 commit 6780bbcCopy full SHA for 6780bbc
1 file changed
.github/workflows/release-winget.yml
@@ -0,0 +1,23 @@
1
+name: "release-winget"
2
+on:
3
+ release:
4
+ types: [released]
5
+
6
+jobs:
7
8
+ runs-on: windows-latest
9
+ steps:
10
+ - name: Publish manifest with winget-create
11
+ run: |
12
+ # Get correct release asset
13
+ $github = Get-Content '${{ github.event_path }}' | ConvertFrom-Json
14
+ $asset = $github.release.assets | Where-Object -Property name -match '64-bit.exe$'
15
16
+ # Remove 'v' and 'vfs' from the version
17
+ $github.release.tag_name -match '\d.*'
18
+ $version = $Matches[0] -replace ".vfs",""
19
20
+ # Download and run wingetcreate
21
+ Invoke-WebRequest https://aka.ms/wingetcreate/latest -OutFile wingetcreate.exe
22
+ .\wingetcreate.exe update Microsoft.Git -u $asset.browser_download_url -v $version -o manifests -t "${{ secrets.WINGET_TOKEN }}" -s
23
+ shell: powershell
0 commit comments