Merge pull request #2 from EcsRx/bug/incorrect-computed-sig #21
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build And Test | |
on: [push] | |
env: | |
BuildVersion: '8.0.${{github.run_number}}' | |
SolutionFile: 'src/EcsR3.sln' | |
jobs: | |
build-and-test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup .NET 9.0 | |
uses: actions/setup-dotnet@v2 | |
with: | |
dotnet-version: 9.0.x | |
- name: .Net Restore | |
run: dotnet restore ${{ env.SolutionFile }} | |
- name: .Net Build | |
run: dotnet build --configuration Release ${{ env.SolutionFile }} | |
- name: .Net Test | |
run: dotnet test --configuration Release --no-build ${{ env.SolutionFile }} --logger trx --collect:"XPlat Code Coverage" | |
- name: Test Report | |
uses: dorny/test-reporter@v1 | |
with: | |
name: Unit Test Summary | |
path: "**/*.trx" | |
reporter: dotnet-trx | |
- name: Code Coverage Summary Report | |
uses: irongut/[email protected] | |
with: | |
filename: '**/coverage.cobertura.xml' | |
badge: true | |
format: 'markdown' | |
output: 'both' | |
- name: Add Coverage PR Comment | |
uses: marocchino/sticky-pull-request-comment@v2 | |
if: github.event_name == 'pull_request' | |
with: | |
recreate: true | |
path: code-coverage-results.md | |
- name: Add Coverage Summary | |
run: cat code-coverage-results.md >> $GITHUB_STEP_SUMMARY | |
package-and-release: | |
runs-on: windows-latest | |
if: startsWith(github.event.ref, 'refs/tags/') | |
needs: [build-and-test] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: .Net Restore | |
run: dotnet restore ${{ env.SolutionFile }} | |
- name: .Net Build | |
run: dotnet build --configuration Release /p:Version=${{ env.BuildVersion }} ${{ env.SolutionFile }} | |
- name: .Net Pack | |
run: dotnet pack --configuration Release /p:Version=${{ env.BuildVersion }} --no-build ${{ env.SolutionFile }} | |
- name: Publish To Nuget | |
run: dotnet nuget push "**/*.nupkg" -k ${{ secrets.NUGET_API_KEY }} -s https://api.nuget.org/v3/index.json |