Skip to content

Commit

Permalink
Update minor files.
Browse files Browse the repository at this point in the history
  • Loading branch information
AraHaan committed Jun 15, 2021
1 parent 11c29ce commit f333221
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 50 deletions.
13 changes: 6 additions & 7 deletions .github/workflows/codacy-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,12 @@ jobs:
dotnet-version: '6.0.x'
include-prerelease: true

- name: Restore
run: dotnet restore
shell: bash

- name: Test
run: dotnet test --configuration Release --no-restore /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:CoverletOutput=./coverage.codacy.opencover.xml
shell: bash
- name: Restore, Build, test, and pack
uses: Elskom/build-dotnet@main
with:
SOLUTION_FILE_PATH: GitBuildInfo.SourceGenerator.sln
TEST: true
PACK: false

- name: Run codacy-coverage-reporter
uses: codacy/codacy-coverage-reporter-action@master
Expand Down
18 changes: 5 additions & 13 deletions .github/workflows/dotnetcore-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,8 @@ jobs:
dotnet-version: '6.0.x'
include-prerelease: true

- name: Restore
run: dotnet restore
shell: bash

- name: Build with dotnet
run: |
dotnet build --configuration Release --no-restore
dotnet pack --configuration Release --no-build --no-restore
shell: bash

- name: Test
run: dotnet test --configuration Release --no-build --no-restore /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:CoverletOutput=./coverage.codacy.opencover.xml
shell: bash
- name: Restore, Build, test, and pack
uses: Elskom/build-dotnet@main
with:
SOLUTION_FILE_PATH: GitBuildInfo.SourceGenerator.sln
TEST: true
25 changes: 9 additions & 16 deletions .github/workflows/dotnetcore-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,28 +20,21 @@ jobs:
dotnet-version: '6.0.x'
include-prerelease: true

- name: Restore
run: dotnet restore
shell: bash

- name: Build with dotnet
run: |
dotnet build --configuration Release --no-restore
dotnet pack --configuration Release --no-build --no-restore
shell: bash

- name: Test
run: dotnet test --configuration Release --no-build --no-restore /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:CoverletOutput=./coverage.codacy.opencover.xml
shell: bash
- name: Restore, Build, test, and pack
uses: Elskom/build-dotnet@main
with:
SOLUTION_FILE_PATH: GitBuildInfo.SourceGenerator.sln
TEST: true

- name: Publish Release
id: publish_nuget
uses: brandedoutcast/publish-nuget@master
uses: Elskom/publish-nuget@main
with:
# Filepath of the project to be packaged, relative to root of repository
PROJECT_FILE_PATH: src/GitBuildInfo.SourceGenerator.csproj
PROJECT_FILE_PATH: '**/*.csproj'
# Path to store all generated nuget packages, relative to root of repository
PACKAGE_PATH: artifacts/
# Flag to toggle git tagging, enabled by default
TAG_COMMIT: false
# API key to authenticate with NuGet server
NUGET_KEY: ${{ secrets.NUGET_API_KEY }}
INCLUDE_SYMBOLS: false
18 changes: 5 additions & 13 deletions .github/workflows/dotnetcore.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,8 @@ jobs:
dotnet-version: '6.0.x'
include-prerelease: true

- name: Restore
run: dotnet restore
shell: bash

- name: Build with dotnet
run: |
dotnet build --configuration Release --no-restore
dotnet pack --configuration Release --no-build --no-restore
shell: bash

- name: Test
run: dotnet test --configuration Release --no-build --no-restore /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:CoverletOutput=./coverage.codacy.opencover.xml
shell: bash
- name: Restore, Build, test, and pack
uses: Elskom/build-dotnet@main
with:
SOLUTION_FILE_PATH: GitBuildInfo.SourceGenerator.sln
TEST: true
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,8 @@ Source Generator for dumping the git branch information, commit hash, and if the

[![Codacy Badge](https://app.codacy.com/project/badge/Grade/d13da68cd3784f1486af29432e75e707)](https://www.codacy.com/gh/Elskom/GitBuildInfo.SourceGenerator/dashboard?utm_source=github.com&utm_medium=referral&utm_content=Elskom/GitBuildInfo.SourceGenerator&utm_campaign=Badge_Grade)
[![Codacy Coverage Badge](https://app.codacy.com/project/badge/Coverage/d13da68cd3784f1486af29432e75e707)](https://www.codacy.com/gh/Elskom/GitBuildInfo.SourceGenerator/dashboard?utm_source=github.com&utm_medium=referral&utm_content=Elskom/GitBuildInfo.SourceGenerator&utm_campaign=Badge_Coverage)
[![NuGet Badge](https://buildstats.info/nuget/GitBuildInfo.SourceGenerator?includePreReleases=true)](https://www.nuget.org/packages/GitBuildInfo.SourceGenerator/)

| Package | Version |
|:-------:|:-------:|
| GitBuildInfo.SourceGenerator | [![NuGet Badge](https://buildstats.info/nuget/GitBuildInfo.SourceGenerator?includePreReleases=true)](https://www.nuget.org/packages/GitBuildInfo.SourceGenerator/) |
| Elskom.GitInformation | [![NuGet Badge](https://buildstats.info/nuget/Elskom.GitInformation?includePreReleases=true)](https://www.nuget.org/packages/Elskom.GitInformation/) |
3 changes: 3 additions & 0 deletions tests/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
<TargetFramework>net6.0</TargetFramework>
<IsPackable>false</IsPackable>
<Nullable>enable</Nullable>
<CollectCoverage>true</CollectCoverage>
<CoverletOutputFormat>opencover</CoverletOutputFormat>
<CoverletOutput>$(MSBuildThisFileDirectory)coverage.codacy.opencover.xml</CoverletOutput>
</PropertyGroup>

</Project>

0 comments on commit f333221

Please sign in to comment.