Automate Windows and Linux releases with Forgejo Actions
Some checks are pending
Release AstroFrame / packages (push) Waiting to run

This commit is contained in:
Elijah 2026-10-03 19:31:43 -07:00
parent f971c374f8
commit 4e6d21de5a
9 changed files with 277 additions and 24 deletions

View 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."