Automate Windows and Linux releases with Forgejo Actions
Some checks are pending
Release AstroFrame / packages (push) Waiting to run
Some checks are pending
Release AstroFrame / packages (push) Waiting to run
This commit is contained in:
parent
f971c374f8
commit
4e6d21de5a
9 changed files with 277 additions and 24 deletions
8
packaging/Set-Version.ps1
Normal file
8
packaging/Set-Version.ps1
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
param([Parameter(Mandatory)][ValidatePattern('^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)$')][string]$Version)
|
||||
$ErrorActionPreference = 'Stop'
|
||||
$path = Join-Path (Split-Path $PSScriptRoot) 'Directory.Build.props'
|
||||
$content = Get-Content -LiteralPath $path -Raw
|
||||
if ([regex]::Matches($content, '<Version>[^<]+</Version>').Count -ne 1) { throw 'Expected one Version in Directory.Build.props.' }
|
||||
$content = [regex]::Replace($content, '<Version>[^<]+</Version>', "<Version>$Version</Version>")
|
||||
[IO.File]::WriteAllText($path, $content)
|
||||
Write-Output "AstroFrame version set to $Version. Commit and push the source, then push tag v$Version to build and publish automatically."
|
||||
Loading…
Add table
Add a link
Reference in a new issue