.forgejo/workflows/dotnet.yaml aktualisiert
Some checks failed
Dotnet Build / build (push) Has been cancelled

This commit is contained in:
WeeXnes 2025-05-18 19:29:44 +00:00
parent 12fbc227a5
commit 025347faf6

View file

@ -16,13 +16,27 @@ jobs:
msbuild -version
- name: Extract project version
shell: pwsh
run: |
$version = Select-String -Path "WeeXnes/WeeXnes.csproj" -Pattern "<Version>(.+?)</Version>" | ForEach-Object {
($_ -match "<Version>(.+?)</Version>") | Out-Null
$matches[1]
}
Write-Output "##vso[task.setvariable variable=PROJECT_VERSION]$version"
Write-Output "Project version is $version"
Write-Output "Version extracted: $version"
"PROJECT_VERSION=$version" | Out-File -FilePath $Env:GITHUB_ENV -Encoding ASCII -Append
- name: Test exported version variable
shell: pwsh
run: |
Write-Output "The extracted project version is: $env:PROJECT_VERSION"
if (-not $env:PROJECT_VERSION) {
Write-Error "PROJECT_VERSION variable is not set!"
exit 1
}
- name: Restore Packages