Skip to content

Dev Home Preview v0.15 #16

Dev Home Preview v0.15

Dev Home Preview v0.15 #16

name: Submit Microsoft.DevHome package to Windows Package Manager Community Repository
on:
workflow_dispatch:
release:
types: [published]
jobs:
sync-repo:
name: Sync winget-pkgs repo
runs-on: ubuntu-latest
steps:
- run: gh repo sync cinnamon-msft/winget-pkgs -b master
env:
GH_TOKEN: ${{ secrets.WINGET_PAT }}
winget:
name: Publish winget package
needs: sync-repo
runs-on: windows-latest
steps:
- name: Submit package to Windows Package Manager Community Repository
run: |
$packageId = "Microsoft.DevHome"
$gitToken = "${{ secrets.WINGET_PAT }}"
# Fetching latest release from GitHub
$github = Invoke-RestMethod -uri "https://api.github.com/repos/microsoft/devhome/releases"
$targetRelease = $github | Where-Object -Property name -match 'Dev Home'| Select-Object -First 1
$installerUrl = $targetRelease | Select-Object -ExpandProperty assets -First 1 | Where-Object -Property name -match 'Windows.DevHome.*?msixbundle' | Select-Object -ExpandProperty browser_download_url
$packageVersion = $targetRelease.tag_name.Trim("v")
# Update package using wingetcreate
Invoke-WebRequest https://aka.ms/wingetcreate/latest -OutFile wingetcreate.exe
.\wingetcreate.exe update $packageId --version $packageVersion --urls "$installerUrl" --submit --token $gitToken