Skip to content

Commit

Permalink
Adding winget workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
Lessley Dennington authored and dscho committed Feb 1, 2022
1 parent 8f5d3b2 commit 8ef44c3
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/release-winget.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: "release-winget"
on:
release:
types: [released]

jobs:
release:
runs-on: windows-latest
steps:
- name: Publish manifest with winget-create
run: |
# Get correct release asset
$github = Get-Content '${{ github.event_path }}' | ConvertFrom-Json
$asset = $github.release.assets | Where-Object -Property name -match '64-bit.exe$'
# Remove 'v' and 'vfs' from the version
$github.release.tag_name -match '\d.*'
$version = $Matches[0] -replace ".vfs",""
# Download and run wingetcreate
Invoke-WebRequest https://aka.ms/wingetcreate/latest -OutFile wingetcreate.exe
.\wingetcreate.exe update Microsoft.Git -u $asset.browser_download_url -v $version -o manifests -t "${{ secrets.WINGET_TOKEN }}" -s
shell: powershell

0 comments on commit 8ef44c3

Please sign in to comment.