File tree Expand file tree Collapse file tree 3 files changed +41
-4
lines changed
Expand file tree Collapse file tree 3 files changed +41
-4
lines changed Original file line number Diff line number Diff line change 66 - ' *'
77 pull_request :
88
9+ concurrency :
10+ group : ci-build-release-lock
11+ cancel-in-progress : true
12+
913jobs :
14+ prepare :
15+ name : Prepare compile matrix
16+ runs-on : windows-2022
17+ outputs :
18+ versions : ${{ steps.versions.outputs.versions }}
19+ steps :
20+ - name : Checkout
21+ uses : actions/checkout@v4
22+
23+ - name : Read versions from Directory.Build.props
24+ id : versions
25+ shell : pwsh
26+ run : |
27+ $propsContent = Get-Content "source/Directory.Build.props" -Raw
28+ $matches = [regex]::Matches($propsContent, 'Release\s+(R\d+)', [System.Text.RegularExpressions.RegexOptions]::IgnoreCase)
29+ $versions = @($matches | ForEach-Object { $_.Groups[1].Value.ToUpperInvariant() } | Sort-Object -Unique)
30+ if ($versions.Count -eq 0) {
31+ throw "No Release Rxx configurations found in source/Directory.Build.props"
32+ }
33+
34+ $versionsJson = $versions | ConvertTo-Json -Compress
35+ "versions=$versionsJson" | Out-File -FilePath $env:GITHUB_OUTPUT -Append -Encoding utf8
36+
1037 compile :
11- name : Compile
38+ needs : prepare
39+ name : Compile ${{ matrix.version }}
1240 runs-on : windows-2022
41+ strategy :
42+ fail-fast : false
43+ matrix :
44+ version : ${{ fromJson(needs.prepare.outputs.versions) }}
1345 steps :
1446 - name : Checkout
1547 uses : actions/checkout@v4
2052 path : |
2153 .nuke/temp
2254 ~/.nuget/packages
23- key : ${{ runner.os }}-${{ hashFiles('**/global.json', '**/*.csproj', '**/Directory.Packages.props') }}
55+ key : ${{ runner.os }}-${{ matrix.version }}-${{ hashFiles('**/global.json', '**/*.csproj', '**/Directory.Packages.props') }}
2456
2557 - name : Compile solution
26- run : ./.nuke/build.cmd
58+ run : ./.nuke/build.cmd --configurations "Release ${{ matrix.version }}"
Original file line number Diff line number Diff line change 1111 required : true
1212 type : string
1313
14+ concurrency :
15+ group : ci-build-release-lock
16+ cancel-in-progress : true
17+
1418jobs :
1519 release :
1620 name : Publish release
Original file line number Diff line number Diff line change 1- using Nuke . Common . Git ;
1+ using Nuke . Common . Git ;
22using Nuke . Common . ProjectModel ;
33using Nuke . Common . Tools . Git ;
44
@@ -7,6 +7,7 @@ sealed partial class Build
77 /// <summary>
88 /// Patterns of solution configurations for compiling.
99 /// </summary>
10+ [ Parameter ]
1011 string [ ] Configurations =
1112 [
1213 "Release*"
You can’t perform that action at this time.
0 commit comments