Skip to content

Commit f48caec

Browse files
committed
Simplify Continuous Integration GitHub action
1 parent e80ef26 commit f48caec

File tree

2 files changed

+4
-17
lines changed

2 files changed

+4
-17
lines changed

.github/workflows/continuous-integration.yml

+4-8
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@ jobs:
2121
permissions:
2222
checks: write
2323
name: Run tests and create NuGet package
24-
outputs:
25-
nupkg-filename: ${{ steps.dotnet-pack.outputs.nupkg-filename }}
2624
steps:
2725
- name: Checkout git repository
2826
uses: actions/checkout@v3
@@ -43,7 +41,6 @@ jobs:
4341
run: dotnet build --no-restore
4442
- name: Run tests
4543
run: dotnet test --no-build
46-
id: dotnet-test
4744
- name: Upload received files from failing tests
4845
uses: actions/upload-artifact@v3
4946
if: failure()
@@ -78,13 +75,12 @@ jobs:
7875
coverage-reports: coverage/*/coverage.cobertura.xml
7976
- name: Create NuGet package
8077
run: dotnet pack --no-build --output .
81-
id: dotnet-pack
8278
- name: Upload NuGet package artifact
8379
if: matrix.os == 'ubuntu-latest'
8480
uses: actions/upload-artifact@v3
8581
with:
86-
name: ${{ steps.dotnet-pack.outputs.nupkg-filename }}
87-
path: ${{ steps.dotnet-pack.outputs.nupkg-filename }}
82+
name: NuGet package
83+
path: "*.nupkg"
8884
- name: Run mutation tests and upload report to Stryker dashboard
8985
env:
9086
STRYKER_DASHBOARD_API_KEY: ${{ secrets.STRYKER_DASHBOARD_API_KEY }}
@@ -114,7 +110,7 @@ jobs:
114110
- name: Download NuGet package artifact
115111
uses: actions/download-artifact@v3
116112
with:
117-
name: ${{ needs.package.outputs.nupkg-filename }}
113+
name: NuGet package
118114
- name: Download release notes artifact
119115
uses: actions/download-artifact@v3
120116
with:
@@ -126,4 +122,4 @@ jobs:
126122
body_path: ReleaseNotes.md
127123
prerelease: ${{ contains(github.ref_name, '-') }}
128124
- name: Publish NuGet package on nuget.org
129-
run: dotnet nuget push ${{ needs.package.outputs.nupkg-filename }} --source https://api.nuget.org/v3/index.json --api-key "${{ secrets.NUGET_API_KEY }}"
125+
run: dotnet nuget push "*.nupkg" --source https://api.nuget.org/v3/index.json --api-key "${{ secrets.NUGET_API_KEY }}"

src/Serilog.Formatting.Log4Net.csproj

-9
Original file line numberDiff line numberDiff line change
@@ -68,13 +68,4 @@
6868
<Exec Command="dotnet validate package local $([MSBuild]::EnsureTrailingSlash($(PackageOutputPath)))$(PackageId).$(PackageVersion).nupkg" />
6969
</Target>
7070

71-
<Target Name="WritePackageVersionForGitHubActions" AfterTargets="Pack" Condition="$(GITHUB_OUTPUT) != ''">
72-
<ItemGroup>
73-
<GitHubOutput Include="version=$(PackageVersion)" />
74-
<!-- No property is provided for the NuGet package file path, see https://github.com/NuGet/Home/issues/6671 -->
75-
<GitHubOutput Include="nupkg-filename=$(PackageId).$(PackageVersion).nupkg" />
76-
</ItemGroup>
77-
<WriteLinesToFile File="$(GITHUB_OUTPUT)" Lines="@(GitHubOutput)" />
78-
</Target>
79-
8071
</Project>

0 commit comments

Comments
 (0)