Skip to content

Commit f333221

Browse files
committed
Update minor files.
1 parent 11c29ce commit f333221

6 files changed

+33
-50
lines changed

.github/workflows/codacy-analysis.yml

+6-7
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,12 @@ jobs:
2929
dotnet-version: '6.0.x'
3030
include-prerelease: true
3131

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

4039
- name: Run codacy-coverage-reporter
4140
uses: codacy/codacy-coverage-reporter-action@master

.github/workflows/dotnetcore-build.yml

+5-13
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,8 @@ jobs:
1919
dotnet-version: '6.0.x'
2020
include-prerelease: true
2121

22-
- name: Restore
23-
run: dotnet restore
24-
shell: bash
25-
26-
- name: Build with dotnet
27-
run: |
28-
dotnet build --configuration Release --no-restore
29-
dotnet pack --configuration Release --no-build --no-restore
30-
shell: bash
31-
32-
- name: Test
33-
run: dotnet test --configuration Release --no-build --no-restore /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:CoverletOutput=./coverage.codacy.opencover.xml
34-
shell: bash
22+
- name: Restore, Build, test, and pack
23+
uses: Elskom/build-dotnet@main
24+
with:
25+
SOLUTION_FILE_PATH: GitBuildInfo.SourceGenerator.sln
26+
TEST: true

.github/workflows/dotnetcore-publish.yml

+9-16
Original file line numberDiff line numberDiff line change
@@ -20,28 +20,21 @@ jobs:
2020
dotnet-version: '6.0.x'
2121
include-prerelease: true
2222

23-
- name: Restore
24-
run: dotnet restore
25-
shell: bash
26-
27-
- name: Build with dotnet
28-
run: |
29-
dotnet build --configuration Release --no-restore
30-
dotnet pack --configuration Release --no-build --no-restore
31-
shell: bash
32-
33-
- name: Test
34-
run: dotnet test --configuration Release --no-build --no-restore /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:CoverletOutput=./coverage.codacy.opencover.xml
35-
shell: bash
23+
- name: Restore, Build, test, and pack
24+
uses: Elskom/build-dotnet@main
25+
with:
26+
SOLUTION_FILE_PATH: GitBuildInfo.SourceGenerator.sln
27+
TEST: true
3628

3729
- name: Publish Release
3830
id: publish_nuget
39-
uses: brandedoutcast/publish-nuget@master
31+
uses: Elskom/publish-nuget@main
4032
with:
4133
# Filepath of the project to be packaged, relative to root of repository
42-
PROJECT_FILE_PATH: src/GitBuildInfo.SourceGenerator.csproj
34+
PROJECT_FILE_PATH: '**/*.csproj'
35+
# Path to store all generated nuget packages, relative to root of repository
36+
PACKAGE_PATH: artifacts/
4337
# Flag to toggle git tagging, enabled by default
4438
TAG_COMMIT: false
4539
# API key to authenticate with NuGet server
4640
NUGET_KEY: ${{ secrets.NUGET_API_KEY }}
47-
INCLUDE_SYMBOLS: false

.github/workflows/dotnetcore.yml

+5-13
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,8 @@ jobs:
1717
dotnet-version: '6.0.x'
1818
include-prerelease: true
1919

20-
- name: Restore
21-
run: dotnet restore
22-
shell: bash
23-
24-
- name: Build with dotnet
25-
run: |
26-
dotnet build --configuration Release --no-restore
27-
dotnet pack --configuration Release --no-build --no-restore
28-
shell: bash
29-
30-
- name: Test
31-
run: dotnet test --configuration Release --no-build --no-restore /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:CoverletOutput=./coverage.codacy.opencover.xml
32-
shell: bash
20+
- name: Restore, Build, test, and pack
21+
uses: Elskom/build-dotnet@main
22+
with:
23+
SOLUTION_FILE_PATH: GitBuildInfo.SourceGenerator.sln
24+
TEST: true

README.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,8 @@ Source Generator for dumping the git branch information, commit hash, and if the
33

44
[![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)
55
[![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)
6-
[![NuGet Badge](https://buildstats.info/nuget/GitBuildInfo.SourceGenerator?includePreReleases=true)](https://www.nuget.org/packages/GitBuildInfo.SourceGenerator/)
6+
7+
| Package | Version |
8+
|:-------:|:-------:|
9+
| GitBuildInfo.SourceGenerator | [![NuGet Badge](https://buildstats.info/nuget/GitBuildInfo.SourceGenerator?includePreReleases=true)](https://www.nuget.org/packages/GitBuildInfo.SourceGenerator/) |
10+
| Elskom.GitInformation | [![NuGet Badge](https://buildstats.info/nuget/Elskom.GitInformation?includePreReleases=true)](https://www.nuget.org/packages/Elskom.GitInformation/) |

tests/Directory.Build.props

+3
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44
<TargetFramework>net6.0</TargetFramework>
55
<IsPackable>false</IsPackable>
66
<Nullable>enable</Nullable>
7+
<CollectCoverage>true</CollectCoverage>
8+
<CoverletOutputFormat>opencover</CoverletOutputFormat>
9+
<CoverletOutput>$(MSBuildThisFileDirectory)coverage.codacy.opencover.xml</CoverletOutput>
710
</PropertyGroup>
811

912
</Project>

0 commit comments

Comments
 (0)