File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 55 branches : [ develop ]
66
77jobs :
8- build :
9- runs-on : ubuntu-latest
8+ test-multiplatform :
9+ name : Test on ${{ matrix.os }}
10+ runs-on : ${{ matrix.os }}
11+ strategy :
12+ matrix :
13+ os : [ubuntu-latest, windows-latest, macos-latest]
1014 permissions :
1115 contents : read
1216
4549 run : dotnet test -c Release --no-build --no-restore --verbosity normal
4650 working-directory : ./src
4751
52+
Original file line number Diff line number Diff line change 55 branches : [ develop ]
66
77jobs :
8- prerelease :
8+ test-multiplatform :
9+ name : Test on ${{ matrix.os }}
10+ runs-on : ${{ matrix.os }}
11+ strategy :
12+ matrix :
13+ os : [ubuntu-latest, windows-latest, macos-latest]
14+ permissions :
15+ contents : read
16+
17+ steps :
18+ - name : Checkout code
19+ uses : actions/checkout@v4
20+ with :
21+ fetch-depth : 0
22+
23+ - name : Setup .NET
24+ uses : actions/setup-dotnet@v4
25+ with :
26+ dotnet-version : 8.0.x
27+
28+ - name : Restore dependencies
29+ run : dotnet restore
30+ working-directory : ./src
31+
32+ - name : Build solution
33+ run : dotnet build -c Release --no-restore
34+ working-directory : ./src
35+
36+ - name : Run tests
37+ run : dotnet test -c Release --no-build --no-restore --verbosity normal
38+ working-directory : ./src
39+
40+ build-artifacts :
41+ name : Build alpha artifacts
942 runs-on : ubuntu-latest
43+ needs : test-multiplatform
1044 permissions :
1145 packages : write
1246 contents : read
3973 run : dotnet build -c Release --no-restore -p:Version=${{ steps.gv.outputs.SemVer }} -p:AssemblyVersion=${{ steps.gv.outputs.AssemblySemVer }} -p:FileVersion=${{ steps.gv.outputs.AssemblySemFileVer }}
4074 working-directory : ./src
4175
42- - name : Run tests
43- run : dotnet test -c Release --no-build --no-restore --verbosity normal
44- working-directory : ./src
45-
4676 - name : Pack NuGet packages (alpha)
4777 run : dotnet pack -c Release --no-restore -o ../artifacts -p:Version=${{ steps.gv.outputs.SemVer }}
4878 working-directory : ./src
5484 path : artifacts
5585 retention-days : 7
5686
87+
Original file line number Diff line number Diff line change @@ -8,8 +8,41 @@ concurrency:
88 cancel-in-progress : true
99
1010jobs :
11+ test-multiplatform :
12+ name : Test on ${{ matrix.os }}
13+ runs-on : ${{ matrix.os }}
14+ strategy :
15+ matrix :
16+ os : [ubuntu-latest, windows-latest, macos-latest]
17+ permissions :
18+ contents : read
19+
20+ steps :
21+ - name : Checkout code
22+ uses : actions/checkout@v4
23+ with :
24+ fetch-depth : 0
25+
26+ - name : Setup .NET
27+ uses : actions/setup-dotnet@v4
28+ with :
29+ dotnet-version : 8.0.x
30+
31+ - name : Restore dependencies
32+ run : dotnet restore
33+ working-directory : ./src
34+
35+ - name : Build solution
36+ run : dotnet build -c Release --no-restore
37+ working-directory : ./src
38+
39+ - name : Run tests
40+ run : dotnet test -c Release --no-build --no-restore --verbosity normal
41+ working-directory : ./src
42+
1143 publish-prerelease :
1244 runs-on : ubuntu-latest
45+ needs : test-multiplatform
1346 permissions :
1447 contents : read
1548 env :
77110 echo "Pushing prerelease package: $p"
78111 dotnet nuget push "$p" --source https://api.nuget.org/v3/index.json --api-key "$NUGET_API_KEY" --skip-duplicate
79112 done
113+
Original file line number Diff line number Diff line change @@ -9,10 +9,44 @@ concurrency:
99 cancel-in-progress : true
1010
1111jobs :
12+ test-multiplatform :
13+ name : Test on ${{ matrix.os }}
14+ runs-on : ${{ matrix.os }}
15+ strategy :
16+ matrix :
17+ os : [ubuntu-latest, windows-latest, macos-latest]
18+ permissions :
19+ contents : read
20+
21+ steps :
22+ - name : Checkout tag
23+ uses : actions/checkout@v4
24+ with :
25+ fetch-depth : 0
26+ ref : ${{ github.event.release.tag_name }}
27+
28+ - name : Setup .NET
29+ uses : actions/setup-dotnet@v4
30+ with :
31+ dotnet-version : 8.0.x
32+
33+ - name : Restore dependencies
34+ run : dotnet restore
35+ working-directory : ./src
36+
37+ - name : Build solution
38+ run : dotnet build -c Release --no-restore
39+ working-directory : ./src
40+
41+ - name : Run tests
42+ run : dotnet test -c Release --no-build --no-restore --verbosity normal
43+ working-directory : ./src
44+
1245 publish :
1346 # Only process releases from develop branch
1447 if : github.event.release.target_commitish == 'develop'
1548 runs-on : ubuntu-latest
49+ needs : test-multiplatform
1650 permissions :
1751 contents : read
1852 env :
91125 dotnet nuget push "$p" --source https://api.nuget.org/v3/index.json --api-key "$NUGET_API_KEY" --skip-duplicate
92126 done
93127
128+
You can’t perform that action at this time.
0 commit comments