Skip to content

Commit 1259f73

Browse files
committed
Pass the generated $(PackageVersion) by MinVer to GitHub actions
1 parent 19e4ab7 commit 1259f73

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

.github/workflows/continuous-integration.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ jobs:
1313
os: [ macos-latest, ubuntu-latest, windows-latest ]
1414
runs-on: ${{ matrix.os }}
1515
name: Run tests and create NuGet package
16+
outputs:
17+
version: ${{ steps.dotnet-pack.outputs.version }}
1618
steps:
1719
- uses: actions/checkout@v2
1820
with:
@@ -25,6 +27,7 @@ jobs:
2527
- run: dotnet build --verbosity normal
2628
- run: dotnet test --no-build --verbosity normal
2729
- run: dotnet pack --no-build --verbosity normal
30+
id: dotnet-pack
2831
publish-release:
2932
runs-on: macos-latest
3033
needs: package

src/Serilog.Formatting.Log4Net.csproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,4 +58,8 @@
5858
<Exec Command="dotnet validate package local $(PackageOutputPath)$(PackageId).$(PackageVersion).nupkg" />
5959
</Target>
6060

61+
<Target Name="PrintPackageVersionForGitHubActions" AfterTargets="Pack">
62+
<Message Importance="high" Text="::set-output name=version::$(PackageVersion)" />
63+
</Target>
64+
6165
</Project>

0 commit comments

Comments
 (0)