-
Notifications
You must be signed in to change notification settings - Fork 5
37 lines (32 loc) · 1.06 KB
/
Copy pathpublish-winget.yml
File metadata and controls
37 lines (32 loc) · 1.06 KB
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
33
34
35
36
37
name: Publish to winget
on:
workflow_dispatch:
permissions:
contents: read
jobs:
winget:
runs-on: windows-latest
steps:
- name: Get latest release version
id: release
shell: bash
env:
GH_TOKEN: ${{ github.token }}
GH_REPO: ${{ github.repository }}
run: |
tag=$(gh release view --json tagName --jq '.tagName')
echo "tag=$tag" >> "$GITHUB_OUTPUT"
echo "version=${tag#v}" >> "$GITHUB_OUTPUT"
- name: Download wingetcreate
shell: pwsh
run: |
Invoke-WebRequest -Uri https://aka.ms/wingetcreate/latest -OutFile wingetcreate.exe
- name: Update WinGet package
shell: pwsh
run: |
$url = "https://github.com/${{ github.repository }}/releases/download/${{ steps.release.outputs.tag }}/ClipPing-Setup.exe|x64"
.\wingetcreate.exe update KevinGosse.ClipPing `
--version ${{ steps.release.outputs.version }} `
--urls $url `
--token ${{ secrets.WINGET_PAT }} `
--submit