Skip to content

Commit 990099b

Browse files
committed
Going back to previous approach
1 parent 2404f34 commit 990099b

File tree

2 files changed

+28
-51
lines changed

2 files changed

+28
-51
lines changed

.github/workflows/build-and-test.yml

Lines changed: 28 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,66 +6,81 @@ env:
66
SolutionFile: 'src/OpenRpg.sln'
77
DemoProject: 'src/OpenRpg.Demos.Web/OpenRpg.Demos.Web.csproj'
88

9+
permissions:
10+
pages: write
11+
id-token: write
12+
913
jobs:
1014
build-and-test:
1115
runs-on: ubuntu-latest
1216
steps:
1317
- uses: actions/checkout@v3
14-
18+
1519
- name: Setup .NET 9.0
1620
uses: actions/setup-dotnet@v2
1721
with:
1822
dotnet-version: 9.0.x
19-
23+
2024
- name: .Net Restore
2125
run: dotnet restore ${{ env.SolutionFile }}
22-
26+
2327
- name: .Net Build
2428
run: dotnet build --configuration Release ${{ env.SolutionFile }}
25-
29+
2630
- name: .Net Test
2731
run: dotnet test --configuration Release --no-build ${{ env.SolutionFile }} --logger trx --collect:"XPlat Code Coverage"
28-
32+
2933
- name: Test Report
3034
uses: dorny/test-reporter@v1
3135
with:
3236
name: Unit Test Summary
3337
path: "**/*.trx"
3438
reporter: dotnet-trx
35-
39+
3640
- name: Code Coverage Summary Report
3741
uses: irongut/CodeCoverageSummary@v1.3.0
3842
with:
3943
filename: '**/coverage.cobertura.xml'
4044
badge: true
4145
format: 'markdown'
4246
output: 'both'
43-
47+
4448
- name: Add Coverage PR Comment
4549
uses: marocchino/sticky-pull-request-comment@v2
4650
if: github.event_name == 'pull_request'
4751
with:
4852
recreate: true
4953
path: code-coverage-results.md
50-
54+
5155
- name: Add Coverage Summary
5256
run: cat code-coverage-results.md >> $GITHUB_STEP_SUMMARY
53-
57+
58+
- name: Build Web Demo
59+
run: dotnet publish -c Release -o demo "${{ env.DemoProject }}"
60+
61+
- name: Upload Pages Artifact
62+
uses: actions/upload-pages-artifact@v3
63+
with:
64+
path: demo/
65+
66+
- name: Deploy Demo to GitHub Pages
67+
uses: actions/deploy-pages@v4
68+
5469
package-and-release:
5570
runs-on: windows-latest
5671
if: startsWith(github.event.ref, 'refs/tags/')
5772
needs: [build-and-test]
5873
steps:
5974
- uses: actions/checkout@v3
60-
75+
6176
- name: .Net Restore
6277
run: dotnet restore ${{ env.SolutionFile }}
63-
78+
6479
- name: .Net Build
6580
run: dotnet build --configuration Release /p:Version=${{ env.BuildVersion }} ${{ env.SolutionFile }}
66-
81+
6782
- name: .Net Pack
6883
run: dotnet pack --configuration Release /p:Version=${{ env.BuildVersion }} --no-build ${{ env.SolutionFile }}
69-
84+
7085
# - name: Publish To Nuget
7186
# run: dotnet nuget push "**/*.nupkg" -k ${{ secrets.NUGET_API_KEY }} -s https://api.nuget.org/v3/index.json

.github/workflows/generate-pages.yml

Lines changed: 0 additions & 38 deletions
This file was deleted.

0 commit comments

Comments
 (0)