-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
50 additions
and
158 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,58 @@ | ||
name: CI Build | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: [ "main" ] | ||
pull_request: | ||
branches: [ "main" ] | ||
tags: | ||
- "McPride.Markdig*-v[0-9]+.[0-9]+.[0-9]+" | ||
- "McPride.Markdig*-v[0-9]+.[0-9]+.[0-9]+-alpha[0-9]+.[0-9]+" | ||
- "McPride.Markdig*-v[0-9]+.[0-9]+.[0-9]+-beta[0-9]+.[0-9]+" | ||
- "McPride.Markdig*-v[0-9]+.[0-9]+.[0-9]+-rc[0-9]+.[0-9]+" | ||
- "McPride.Markdig*-v[0-9]+.[0-9]+.[0-9]+-preview[0-9]+.[0-9]+" | ||
- "McPride.Markdig*-v[0-9]+.[0-9]+.[0-9]+-prerelease[0-9]+.[0-9]+" | ||
- "McPride.Markdig*-v[0-9]+.[0-9]+.[0-9]+-pre[0-9]+.[0-9]+" | ||
|
||
jobs: | ||
shared: | ||
uses: ./.github/workflows/shared.yml | ||
build: | ||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Setup .NET | ||
uses: actions/setup-dotnet@v3 | ||
with: | ||
dotnet-version: 6.0.x | ||
- name: Restore dependencies | ||
run: dotnet restore src/mcpride-markdig-extensions.sln | ||
- name: Build Debug | ||
run: dotnet build src/mcpride-markdig-extensions.sln --no-restore --configuration Debug | ||
- name: Test | ||
run: dotnet test src/mcpride-markdig-extensions.sln --no-build --verbosity normal --collect:"XPlat Code Coverage" --logger trx --results-directory ./coverage | ||
- name: Code Coverage Summary Report | ||
uses: irongut/[email protected] | ||
with: | ||
filename: coverage/*/coverage.cobertura.xml | ||
badge: true | ||
fail_below_min: false | ||
format: markdown | ||
hide_branch_rate: false | ||
hide_complexity: false | ||
indicators: true | ||
output: both | ||
thresholds: '60 80' | ||
- 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: Write to Job Summary | ||
run: cat code-coverage-results.md >> $GITHUB_STEP_SUMMARY | ||
release: | ||
if: github.event_name == 'tags' | ||
needs: test | ||
runs-on: ubuntu-latest | ||
needs: shared | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
|
@@ -21,6 +62,8 @@ jobs: | |
with: | ||
dotnet-version: 6.0.x | ||
- name: Restore dependencies | ||
run: dotnet restore src/mcpride-markdig-extensions.sln | ||
run: dotnet restore src/mcpride-markdig-extensions.sln | ||
- name: Build release | ||
run: dotnet build src/mcpride-markdig-extensions.sln --no-restore --configuration Release | ||
run: dotnet build src/mcpride-markdig-extensions.sln --no-restore --configuration Release | ||
- name: Push packages to nuget.org | ||
run: dotnet nuget push ./**/Release/McPride.Markdig.*.nupkg --source https://api.nuget.org/v3/index.json --api-key ${{ secrets.NUGET_PUSH_API_KEY }} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.