-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrelease.ps1
More file actions
25 lines (19 loc) · 844 Bytes
/
release.ps1
File metadata and controls
25 lines (19 loc) · 844 Bytes
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
Push-Location
Set-Location $PSScriptRoot
$name = 'EdgeWorkspaces'
$assembly = "Community.PowerToys.Run.Plugin.$name"
$version = "v$((Get-Content ./plugin.json | ConvertFrom-Json).Version)"
$archs = @('x64', 'arm64')
git tag $version
git push --tags
Remove-Item ./out/*.zip -Recurse -Force -ErrorAction Ignore
foreach ($arch in $archs) {
$releasePath = "./bin/$arch/Release/net8.0-windows"
dotnet build -c Release /p:Platform=$arch
Remove-Item "./out/$name/*" -Recurse -Force -ErrorAction Ignore
mkdir "./out/$name" -ErrorAction Ignore
Copy-Item "$releasePath/$assembly.dll", "$releasePath/plugin.json", "$releasePath/Images", "$releasePath/$assembly.deps.json" "./out/$name" -Recurse -Force
Compress-Archive "./out/$name" "./out/$name-$version-$arch.zip" -Force
}
gh release create $version (Get-ChildItem ./out/*.zip)
Pop-Location