-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
winget deployment added to the release pipeline
- Loading branch information
1 parent
bd8e422
commit 480d942
Showing
9 changed files
with
84 additions
and
15 deletions.
There are no files selected for viewing
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Created using wingetcreate 1.6.1.0 | ||
# yaml-language-server: $schema=https://aka.ms/winget-manifest.installer.1.6.0.schema.json | ||
|
||
PackageIdentifier: LowLevelDesign.ProcessGovernor | ||
PackageVersion: ###VERSION### | ||
InstallerType: zip | ||
NestedInstallerType: portable | ||
Installers: | ||
- Architecture: x64 | ||
NestedInstallerFiles: | ||
- RelativeFilePath: procgov64.exe | ||
PortableCommandAlias: procgov64 | ||
- RelativeFilePath: procgov32.exe | ||
PortableCommandAlias: procgov32 | ||
InstallerUrl: https://github.com/lowleveldesign/process-governor/releases/download/###TAG###/procgov.zip | ||
InstallerSha256: ###FILE_HASH### | ||
- Architecture: x86 | ||
NestedInstallerFiles: | ||
- RelativeFilePath: procgov32.exe | ||
PortableCommandAlias: procgov32 | ||
InstallerUrl: https://github.com/lowleveldesign/process-governor/releases/download/###TAG###/procgov.zip | ||
InstallerSha256: ###FILE_HASH### | ||
ManifestType: installer | ||
ManifestVersion: 1.6.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# Created using wingetcreate 1.6.1.0 | ||
# yaml-language-server: $schema=https://aka.ms/winget-manifest.defaultLocale.1.6.0.schema.json | ||
|
||
PackageIdentifier: LowLevelDesign.ProcessGovernor | ||
PackageVersion: ###VERSION### | ||
PackageLocale: en-US | ||
Publisher: Sebastian Solnica | ||
PackageName: procgov | ||
License: MIT License | ||
ShortDescription: Process Governor allows you to put various limits on Windows processes. | ||
ManifestType: defaultLocale | ||
ManifestVersion: 1.6.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Created using wingetcreate 1.6.1.0 | ||
# yaml-language-server: $schema=https://aka.ms/winget-manifest.version.1.6.0.schema.json | ||
|
||
PackageIdentifier: LowLevelDesign.ProcessGovernor | ||
PackageVersion: ###VERSION### | ||
DefaultLocale: en-US | ||
ManifestType: version | ||
ManifestVersion: 1.6.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
$ErrorActionPreference="Stop" | ||
|
||
if (-not (Test-Path -Path "wingetcreate.exe")) { | ||
Invoke-WebRequest -Uri "https://github.com/microsoft/winget-create/releases/latest/download/wingetcreate.exe" -OutFile "wingetcreate.exe" | ||
} | ||
|
||
$BuildNumber = $env:GITHUB_RUN_NUMBER % [int16]::MaxValue | ||
$Tag = [System.IO.Path]::GetFileName("$env:GITHUB_REF") | ||
if (-not ($Tag -match "^(\d+\.\d+\.\d+)(\-.+)?$")) { Write-Error "Invalid tag name for the release." } | ||
$Version = "$($Matches[1]).$buildNumber" | ||
|
||
$FileHash = $(Get-FileHash -Algorithm SHA256 "procgov.zip").Hash | ||
Get-ChildItem -Path ".winget" -Filter *.yaml | Foreach-Object -Process { | ||
$FilePath = $_.FullName | ||
$Content = Get-Content -Encoding UTF8 $FilePath | ||
$Content = $Content -replace "###VERSION###", $Version -replace "###FILE_HASH###", $FileHash -replace "###TAG###", $Tag | ||
Set-Content -Encoding Utf8 -Path $FilePath -Value $Content | ||
} | ||
|
||
.\wingetcreate.exe submit -p "procgov v$Version" -t "$env:WINGET_GH_TOKEN" .winget |