File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44 - eliaspr/build-workflow-update
55
66jobs :
7+ validate-version :
8+ name : ' Validate version'
9+ runs-on : ubuntu-24.04
10+ steps :
11+ - uses : actions/checkout@v2
12+ - name : ' Extract and validate turnierplan.NET version'
13+ id : extract-version
14+ shell : pwsh
15+ run : |
16+ $LatestTag = git describe --tags --abbrev=0 --match=[0-9]*.[0-9]*.[0-9]*
17+ $VersionXmlContent = Get-Content -Path "version.xml" -Raw
18+ $Version = [regex]::Match($VersionXmlContent, '<Version>(\d+\.\d+\.\d+)</Version>').Groups[1].Value
19+ Write-Host "Last git tag: $LatestTag"
20+ Write-Host "Detected version: $Version"
21+ if ($Version -eq $LatestTag) {
22+ Write-Host "Version equals latest tag, failing workflow!"
23+ exit 1
24+ }
25+ Add-Content -Path $env:GITHUB_OUTPUT -Value "turnierplan_version=$Version"
26+ working-directory : ' ./src'
27+ outputs :
28+ turnierplan_version : ${{ steps.extract-version.outputs.turnierplan_version }}
29+
730 container-image :
831 name : ' Build container image'
932 runs-on : ubuntu-24.04
33+ needs :
34+ - validate-version
1035 steps :
1136 - uses : actions/checkout@v2
37+ - name : ' Test'
38+ shell : pwsh
39+ run : |
40+ Write-Host ${{ needs.validate-version.outputs.turnierplan_version }}
1241 # - name: 'Extract turnierplan.NET version'
1342 # shell: pwsh
1443 # run: |
3968 nuget-package :
4069 name : ' Build NuGet package'
4170 runs-on : ubuntu-24.04
71+ needs :
72+ - validate-version
4273 steps :
4374 - uses : actions/checkout@v2
4475 # - name: 'Setup .NET SDK 9.x'
You can’t perform that action at this time.
0 commit comments