-
Notifications
You must be signed in to change notification settings - Fork 1
32 lines (26 loc) · 908 Bytes
/
winget.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
name: Winget CI
on:
workflow_dispatch:
workflow_call:
release:
types:
- edited
jobs:
winget:
name: Update winget manifest
runs-on: windows-latest
steps:
- name: Setup winget-create
run: choco install wingetcreate
- name: Bump Winget manifest
shell: pwsh
env:
WINGET_GITHUB_TOKEN: '${{ secrets.WINGET_UPLOAD_GITHUB_TOKEN }}'
run: >
$tagname = $env:GITHUB_REF.Replace("refs/tags/", "")
$version = $tagname.Replace("v", "")
$url = "https://github.com/DRSchlaubi/tonbrett/releases/download/${tagname}/Tonbrett.msix"
wingetcreate.exe update Schlaubi.Tonbrett -u $url --version $version
if ($version -notmatch "-") {
wingetcreate.exe submit .\manifests\s\Schlaubi\Tonbrett\${version}\ --token $env:WINGET_GITHUB_TOKEN
}