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 ldennington committed Jan 20, 2022
1 parent 137daaf commit eccfba2
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 '.exe$'
# Remove 'v' and 'vfs' from the version
$assets.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 eccfba2

Please sign in to comment.