Skip to content

Commit 8e19cec

Browse files
authored
Add publish to winget workflow
1 parent 6b12869 commit 8e19cec

4 files changed

Lines changed: 58 additions & 20 deletions

.github/workflows/publish.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Publish to package managers
2+
3+
on:
4+
release:
5+
types:
6+
- published
7+
8+
workflow_dispatch:
9+
10+
jobs:
11+
publish:
12+
if: "!github.event.release.prerelease"
13+
runs-on: windows-latest
14+
15+
steps:
16+
- uses: actions/checkout@v4
17+
18+
- name: Set up Git
19+
run: |
20+
git clone https://github.com/tanchekwei/VisualStudioCodeForCommandPalette.git --depth 1
21+
22+
- name: Publish to Package Managers
23+
run: |
24+
$response = Invoke-RestMethod -Uri https://api.github.com/repos/tanchekwei/VisualStudioCodeForCommandPalette/releases/latest
25+
26+
$ver = $response.tag_name.TrimStart('v')
27+
28+
$exe = $response.assets | Where-Object { $_.name -like "*x64*" } | Select-Object -ExpandProperty browser_download_url
29+
$exeARM = $response.assets | Where-Object { $_.name -like "*arm64*" } | Select-Object -ExpandProperty browser_download_url
30+
31+
Invoke-WebRequest -Uri $exe -OutFile .\x64.exe
32+
Invoke-WebRequest -Uri $exeARM -OutFile .\arm.exe
33+
$exehash = Get-FileHash -Path .\x64.exe -Algorithm SHA256 | Select-Object -ExpandProperty Hash
34+
$exeARMhash = Get-FileHash -Path .\arm.exe -Algorithm SHA256 | Select-Object -ExpandProperty Hash
35+
36+
# Publish to Winget
37+
$wingetPackage = "15722UsefulApp.WorkspaceLauncherForVSCode"
38+
Invoke-WebRequest -Uri https://aka.ms/wingetcreate/latest -OutFile wingetcreate.exe
39+
cd .\VisualStudioCodeForCommandPalette\winget-pkg
40+
Get-ChildItem *.* -Recurse | ForEach-Object {
41+
(Get-Content $_.FullName) -replace '__VERSION__', "$ver" `
42+
-replace '__URL__', "$exe" `
43+
-replace '__SHA256__', "$exehash" `
44+
-replace '__armURL__', "$exeARM" `
45+
-replace '__armSHA256__', "$exeARMhash" |
46+
Set-Content $_.FullName
47+
}
48+
echo "Publishing to winget..."
49+
..\..\wingetcreate submit -p "New version: $wingetPackage version $ver" -t ${{ secrets.WINGETCREATE_GITHUB }} .

winget-pkg/15722UsefulApp.CommandPalette-VisualStudioCode.installer.yaml

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,18 @@
1-
# Created using wingetcreate 1.9.4.0
2-
# yaml-language-server: $schema=https://aka.ms/winget-manifest.installer.1.9.0.schema.json
3-
41
PackageIdentifier: 15722UsefulApp.WorkspaceLauncherForVSCode
5-
PackageVersion: 0.0.2.0
2+
PackageVersion: __VERSION__
63
Platform:
74
- Windows.Universal
85
- Windows.Desktop
96
MinimumOSVersion: 10.0.19041.0
107
InstallerType: msix
118
PackageFamilyName: 15722UsefulApp.WorkspaceLauncherForVSCode_n7w7pg6r3cfgr
129
Installers:
13-
- Architecture: arm64
14-
InstallerUrl: https://github.com/tanchekwei/WorkspaceLauncherForVSCode/releases/download/WorkspaceLauncherForVSCode1.7.0/15722UsefulApp.WorkspaceLauncherForVSCode_1.7.1.0_arm64.msix
15-
InstallerSha256: 2D1A7205D18E5E10184E6BF27313BB8861CC30EC41E613C793E030AED0177A66
16-
SignatureSha256: 8F2DC4AD6C85E0A6DDABF47A68E56AE4750CD968C2844ECEAE090115C90B80FC
1710
- Architecture: x64
18-
InstallerUrl: https://github.com/tanchekwei/WorkspaceLauncherForVSCode/releases/download/WorkspaceLauncherForVSCode1.7.0/15722UsefulApp.WorkspaceLauncherForVSCode_1.7.1.0_x64.msix
19-
InstallerSha256: 6428509FE96E562C190DB2212F5A0D7EAEF57E49AFA5AA829157168721B4228E
20-
SignatureSha256: AE8C17F8B9CDF0856B44E7596F2FA7439095E0A5520FF7D29E46B608A14ED5DB
11+
InstallerUrl: __URL__
12+
InstallerSha256: __SHA256__
13+
- Architecture: arm64
14+
InstallerUrl: __armURL__
15+
InstallerSha256: __armSHA256__
2116
ManifestType: installer
2217
ManifestVersion: 1.9.0
2318
ReleaseDate: 2025-05-10

winget-pkg/15722UsefulApp.CommandPalette-VisualStudioCode.locale.en-US.yaml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
1-
# Created using wingetcreate 1.9.4.0
2-
# yaml-language-server: $schema=https://aka.ms/winget-manifest.defaultLocale.1.9.0.schema.json
3-
41
PackageIdentifier: 15722UsefulApp.WorkspaceLauncherForVSCode
5-
PackageVersion: 1.7.1.0
2+
PackageVersion: __VERSION__
63
PackageLocale: en-US
74
Publisher: 15722UsefulApp
85
PublisherUrl: https://github.com/tanchekwei
@@ -23,7 +20,7 @@ Tags:
2320
- visual-studio-code
2421
- vscode
2522
- vs-code
26-
ReleaseNotesUrl: https://github.com/tanchekwei/WorkspaceLauncherForVSCode/releases
23+
ReleaseNotesUrl: https://github.com/tanchekwei/WorkspaceLauncherForVSCode/releases/tag/v__VERSION__
2724
Documentations:
2825
- DocumentLabel: Wiki
2926
DocumentUrl: https://github.com/tanchekwei/WorkspaceLauncherForVSCode
Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
1-
# Created using wingetcreate 1.9.4.0
2-
# yaml-language-server: $schema=https://aka.ms/winget-manifest.version.1.9.0.schema.json
3-
41
PackageIdentifier: 15722UsefulApp.WorkspaceLauncherForVSCode
5-
PackageVersion: 1.7.1.0
2+
PackageVersion: __VERSION__
63
DefaultLocale: en-US
74
ManifestType: version
85
ManifestVersion: 1.9.0

0 commit comments

Comments
 (0)