mirror of
https://github.com/xoofx/markdig.git
synced 2026-02-04 05:44:50 +00:00
65 lines
1.8 KiB
YAML
65 lines
1.8 KiB
YAML
name: ci
|
|
|
|
env:
|
|
PROJECT_NAME: Markdig
|
|
|
|
on:
|
|
push:
|
|
paths-ignore:
|
|
- 'doc/**'
|
|
- 'img/**'
|
|
- 'changelog.md'
|
|
- 'readme.md'
|
|
pull_request:
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: windows-latest
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v1
|
|
|
|
- name: Install .NET 5.0
|
|
uses: actions/setup-dotnet@v1
|
|
with:
|
|
dotnet-version: '5.0.x'
|
|
|
|
- name: Build (Release)
|
|
run: dotnet build src -c Release
|
|
|
|
- name: SpecFileGen
|
|
run: dotnet src/SpecFileGen/bin/Release/net5.0/SpecFileGen.dll
|
|
|
|
- name: Test (Release)
|
|
run: dotnet test src -c Release
|
|
|
|
- name: Build & Test (Debug)
|
|
run: dotnet test src -c Debug
|
|
|
|
- name: Coverlet
|
|
run: dotnet test src -c Release -f net5.0 /p:Include=\"[${{env.PROJECT_NAME}}]*\" /p:CollectCoverage=true /p:CoverletOutputFormat=lcov
|
|
|
|
- name: Coveralls Upload
|
|
uses: coverallsapp/github-action@v1.0.1
|
|
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
|
|
with:
|
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
path-to-lcov: src/${{env.PROJECT_NAME}}.Tests/coverage.info
|
|
|
|
- name: Pack
|
|
run: dotnet pack src -c Release
|
|
|
|
- name: Pack Signed
|
|
run: dotnet pack -c Release src/${{env.PROJECT_NAME}}.Signed/${{env.PROJECT_NAME}}.Signed.csproj
|
|
|
|
- name: Publish
|
|
if: github.event_name == 'push'
|
|
run: |
|
|
if ( "${{github.ref}}" -match "^refs/tags/[0-9]+\.[0-9]+\.[0-9]+$" ) {
|
|
dotnet nuget push src\${{env.PROJECT_NAME}}\bin\Release\*.nupkg -s nuget.org -k ${{secrets.NUGET_TOKEN}}
|
|
dotnet nuget push src\${{env.PROJECT_NAME}}.Signed\bin\Release\*.nupkg -s nuget.org -k ${{secrets.NUGET_TOKEN}}
|
|
} else {
|
|
echo "publish is only enabled by tagging with a release tag"
|
|
}
|