More examples and functions #36
Workflow file for this run
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: .NET Core | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Fetch all history for all tags and branches | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Install GitVersion | |
uses: gittools/actions/gitversion/setup@v0 | |
with: | |
versionSpec: 5.x | |
- name: Use GitVersion | |
id: gitversion | |
uses: gittools/actions/gitversion/execute@v0 | |
- name: Setup .NET Core | |
uses: actions/setup-dotnet@v1 | |
with: | |
dotnet-version: 7.x | |
- name: Install dependencies | |
run: dotnet restore | |
- name: Build | |
run: dotnet build --configuration Release --no-restore | |
- name: Test | |
run: dotnet test --no-restore --verbosity normal | |
- name: coverlet | |
uses: b3b00/[email protected] | |
with: | |
testProject: tests/PlantUml.Builder.Tests/PlantUml.Builder.Tests.csproj | |
output: lcov.info | |
outputFormat: lcov | |
excludes: '[PlantUml.Builder.Tests]*' | |
- name: coveralls | |
uses: coverallsapp/github-action@v2 | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
path-to-lcov: tests/PlantUml.Builder.Tests/lcov.info | |
- name: Pack | |
run: dotnet pack -v normal --configuration Release --no-restore --include-symbols --include-source -p:PackageVersion=${{ steps.gitversion.outputs.NuGetVersion }} src/PlantUml.Builder/PlantUml.Builder.csproj | |
- name: Upload Artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: nupkg | |
path: ./src/PlantUml.Builder/bin/Release/*.nupkg | |
- name: Push NuGet | |
if: ${{ github.ref == 'refs/heads/main' }} | |
run: dotnet nuget push ./src/PlantUml.Builder/bin/Release/*.nupkg --source https://api.nuget.org/v3/index.json --api-key ${{secrets.NUGET_API_KEY}} --skip-duplicate |