@@ -33,45 +33,43 @@ jobs:
33
33
with :
34
34
xml-file : ' ./Directory.Build.props'
35
35
xpath : ' //Version'
36
+
36
37
- name : Create short version
37
38
id : shortversion
38
39
run : |
39
40
$version = "${{ steps.get_version.outputs.info }}".Substring(0, "${{ steps.get_version.outputs.info }}".LastIndexOf("."))
40
41
Write-Host "::set-output name=shortversion::$version"
41
42
shell : pwsh
43
+
42
44
- name : Restore dependencies
43
45
run : dotnet restore
46
+
44
47
- name : Build
45
48
run : dotnet build --no-restore -c Release .\Serilog.Enrichers.Sensitive.sln
49
+
46
50
- name : Test
47
51
run : dotnet test --no-build --verbosity normal -c Release
52
+
48
53
- name : Create NuGet package for Serilog.Enrichers.Sensitive
49
54
run : dotnet pack ./src/Serilog.Enrichers.Sensitive/Serilog.Enrichers.Sensitive.csproj -c Release --no-build --no-restore -o ./packaging
55
+
50
56
- name : Get changelog
51
57
id : get_changelog
52
58
run : |
53
59
./get-changelog.ps1 -currentVersion "${{ steps.shortversion.outputs.shortversion }}"
54
60
shell : pwsh
61
+
55
62
- name : Create Release
56
63
id : create_release
57
- uses : actions/create-release@v1
58
- env :
59
- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
64
+ uses : softprops/action-gh-release@v2
60
65
with :
66
+ files : ./packaging/Serilog.Enrichers.Sensitive.${{ steps.shortversion.outputs.shortversion }}.nupkg
61
67
tag_name : ${{ steps.get_version.outputs.info }}
62
- release_name : ${{ steps.get_version.outputs.info }}
68
+ name : ${{ steps.get_version.outputs.info }}
63
69
draft : false
64
70
prerelease : false
65
71
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
+
76
74
- name : Publish enricher package to public NuGet repository
77
75
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