add builder and updater
This commit is contained in:
20
scripts/release.ps1
Normal file
20
scripts/release.ps1
Normal file
@ -0,0 +1,20 @@
|
||||
param([switch]$Publish)
|
||||
|
||||
$ErrorActionPreference = 'Stop'
|
||||
Push-Location (Split-Path $PSScriptRoot -Parent)
|
||||
try {
|
||||
# Invalidate any older result even if npm ci or tests fail.
|
||||
Remove-Item -LiteralPath 'dist/release/release-ready.json' -Force -ErrorAction SilentlyContinue
|
||||
npm ci
|
||||
if ($LASTEXITCODE -ne 0) { throw 'Dependency installation failed.' }
|
||||
npm run release:win
|
||||
if ($LASTEXITCODE -ne 0) { throw 'Signed release build failed.' }
|
||||
if ($Publish) {
|
||||
npm run publish:release -- --upload
|
||||
} else {
|
||||
npm run publish:release
|
||||
}
|
||||
if ($LASTEXITCODE -ne 0) { throw 'Release verification or publication failed.' }
|
||||
} finally {
|
||||
Pop-Location
|
||||
}
|
||||
Reference in New Issue
Block a user