@@ -33,45 +33,43 @@ jobs:
3333 with :
3434 xml-file : ' ./Directory.Build.props'
3535 xpath : ' //Version'
36+
3637 - name : Create short version
3738 id : shortversion
3839 run : |
3940 $version = "${{ steps.get_version.outputs.info }}".Substring(0, "${{ steps.get_version.outputs.info }}".LastIndexOf("."))
4041 Write-Host "::set-output name=shortversion::$version"
4142 shell : pwsh
43+
4244 - name : Restore dependencies
4345 run : dotnet restore
46+
4447 - name : Build
4548 run : dotnet build --no-restore -c Release .\Serilog.Enrichers.Sensitive.sln
49+
4650 - name : Test
4751 run : dotnet test --no-build --verbosity normal -c Release
52+
4853 - name : Create NuGet package for Serilog.Enrichers.Sensitive
4954 run : dotnet pack ./src/Serilog.Enrichers.Sensitive/Serilog.Enrichers.Sensitive.csproj -c Release --no-build --no-restore -o ./packaging
55+
5056 - name : Get changelog
5157 id : get_changelog
5258 run : |
5359 ./get-changelog.ps1 -currentVersion "${{ steps.shortversion.outputs.shortversion }}"
5460 shell : pwsh
61+
5562 - name : Create Release
5663 id : create_release
57- uses : actions/create-release@v1
58- env :
59- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
64+ uses : softprops/action-gh-release@v2
6065 with :
66+ files : ./packaging/Serilog.Enrichers.Sensitive.${{ steps.shortversion.outputs.shortversion }}.nupkg
6167 tag_name : ${{ steps.get_version.outputs.info }}
62- release_name : ${{ steps.get_version.outputs.info }}
68+ name : ${{ steps.get_version.outputs.info }}
6369 draft : false
6470 prerelease : false
6571 body_path : ./version-changelog.md
66- - name : Upload enricher NuGet package
67- id : upload-nuget-enricher
68- uses : actions/upload-release-asset@v1
69- env :
70- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
71- with :
72- upload_url : ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
73- asset_path : ./packaging/Serilog.Enrichers.Sensitive.${{ steps.shortversion.outputs.shortversion }}.nupkg
74- asset_name : Serilog.Enrichers.Sensitive.${{ steps.shortversion.outputs.shortversion }}.nupkg
75- asset_content_type : application/octet-stream
72+ make_latest : true
73+
7674 - name : Publish enricher package to public NuGet repository
7775 run : dotnet nuget push -k ${{ secrets.NUGET_TOKEN }} -s https://api.nuget.org/v3/index.json ./packaging/Serilog.Enrichers.Sensitive.${{ steps.shortversion.outputs.shortversion }}.nupkg --skip-duplicate --no-symbols
0 commit comments