18
18
outputs :
19
19
version : ${{ steps.dotnet-pack.outputs.version }}
20
20
nupkg-filename : ${{ steps.dotnet-pack.outputs.nupkg-filename }}
21
+ release-body : ${{ steps.tag-message.outputs.release-notes }}
21
22
steps :
22
23
- name : Checkout git repository
23
24
uses : actions/checkout@v2
43
44
with :
44
45
name : ${{ steps.dotnet-pack.outputs.nupkg-filename }}
45
46
path : ${{ steps.dotnet-pack.outputs.nupkg-filename }}
47
+ - name : Retrieve tag message
48
+ run : |
49
+ git fetch --tags --force
50
+ echo "::set-output name=release-notes::$(git tag --list ${{ steps.dotnet-pack.outputs.version }} --format='%(contents)')"
51
+ id : tag-message
46
52
publish :
47
53
runs-on : macos-latest
48
54
needs : package
@@ -53,19 +59,19 @@ jobs:
53
59
uses : actions/download-artifact@v2
54
60
with :
55
61
name : ${{ steps.dotnet-pack.outputs.nupkg-filename }}
56
- - name : Add GitHub package registry source
57
- run : dotnet nuget add source https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json --name github --username ${{ github.repository_owner }} --password ${{ github.token }} --store-password-in-clear-text
58
- - name : Publish NuGet package on nuget.org
59
- run : dotnet nuget push ${{ needs.package.outputs.nupkg-filename }} --source https://api.nuget.org/v3/index.json --api-key "${{ secrets.NUGET_API_KEY }}"
60
- - name : Publish NuGet package on github.com
61
- run : dotnet nuget push ${{ needs.package.outputs.nupkg-filename }} --source github
62
62
- name : Create GitHub Release
63
63
uses : actions/create-release@v1
64
64
env :
65
65
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
66
66
with :
67
67
tag_name : ${{ needs.package.outputs.version }}
68
68
release_name : Version ${{ needs.package.outputs.version }}
69
- body : ${{ github.event.head_commit.message }}
69
+ body : ${{ needs.package.outputs.release-body }}
70
70
draft : false
71
71
prerelease : ${{ contains(needs.package.outputs.version, '-') }}
72
+ - name : Add GitHub package registry source
73
+ run : dotnet nuget add source https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json --name github --username ${{ github.repository_owner }} --password ${{ github.token }} --store-password-in-clear-text
74
+ - name : Publish NuGet package on github.com
75
+ run : dotnet nuget push ${{ needs.package.outputs.nupkg-filename }} --source github
76
+ - name : Publish NuGet package on nuget.org
77
+ run : dotnet nuget push ${{ needs.package.outputs.nupkg-filename }} --source https://api.nuget.org/v3/index.json --api-key "${{ secrets.NUGET_API_KEY }}"
0 commit comments