Skip to content

Commit 63142b2

Browse files
committed
publish-winget: ready to update on published release
1 parent fa0cf47 commit 63142b2

File tree

2 files changed

+13
-11
lines changed

2 files changed

+13
-11
lines changed

.github/workflows/publish-winget.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,29 +11,29 @@ jobs:
1111
name: Publish winget package
1212
runs-on: windows-latest
1313
steps:
14-
- name: Submit package to Windows Package Manager Community Repository
14+
- name: Submit package to Windows repository
1515
run: |
1616
# Download WingetCreate
1717
Invoke-WebRequest https://aka.ms/wingetcreate/latest -OutFile wingetcreate.exe
18+
1819
# Retrieve the descriptor of Audiveris latest release
1920
$latest = Invoke-RestMethod 'https://api.github.com/repos/Audiveris/audiveris/releases/latest'
2021
$tag_name = $latest.tag_name
2122
echo "=== tag_name is $tag_name"
23+
2224
# Retrieve all Windows installers among the release assets
2325
$installers = $latest.assets | Where-Object -Property name -match '.msi'
2426
echo "=== installers:"
2527
$installers
28+
2629
# Retrieve the download URL of the (first) Windows installer
2730
$installerUrl = $installers | Select -ExpandProperty browser_download_url -First 1
2831
echo "=== installerUrl is $installerUrl"
29-
# Create a folder
30-
New-Item -Path "." -Name "myDocs" -ItemType Directory
31-
echo "=== dir -Recurse myDocs"
32-
dir -Recurse myDocs
33-
# Create the manifest
34-
echo "=== creating manifest"
35-
##.\wingetcreate.exe New $installerUrl --out myDocs
36-
.\wingetcreate.exe update audiveris -v $latest.tag_name -u $installerUrl
37-
echo "=== created manifest"
38-
dir -Recurse myDocs
3932
33+
# Update the manifest
34+
echo "=== updating manifest..."
35+
.\wingetcreate.exe update audiveris.org.Audiveris -v $latest.tag_name -u $installerUrl -t ${{ secrets.WINGET_PAT }}
36+
echo "=== manifest updated!"
37+
38+
# Display the updated Audiveris information
39+
winget show audiveris.org.Audiveris

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@ docs/build
4848
docs/build/*
4949
packaging/build
5050
packaging/build/*
51+
packaging/manifests
52+
packaging/manifests/*
5153
packaging/.gradle/*
5254
private/*
5355
schemas/bin/

0 commit comments

Comments
 (0)