66 branches : [ "main" ]
77
88jobs :
9- build :
9+ publish :
1010
1111 runs-on : ubuntu-latest
1212
@@ -21,17 +21,37 @@ jobs:
2121 - name : Build
2222 run : dotnet build --no-restore
2323 - name : Pack
24- run : dotnet pack --no-build -c Release -o ${{github.workspace}}/Packages
24+ run : dotnet pack --no-build --include-symbols - c Release -o ${{github.workspace}}/Packages
2525 - name : Upload Artifact
2626 uses : actions/upload-artifact@v4
2727 with :
2828 name : nupkg
29- path : ${{github.workspace}}/Packages/*.nupkg
29+ path : |
30+ ${{github.workspace}}/Packages/*.nupkg
31+ ${{github.workspace}}/Packages/*.snupkg ,.
3032 - name : Download Artifact
3133 uses : actions/download-artifact@v4
3234 with :
3335 name : nupkg
34- path : ${{github.workspace}}/Packages/*.nupkg
35-
36+ path : |
37+ ${{github.workspace}}/Packages/*.nupkg
38+ ${{github.workspace}}/Packages/*.snupkg
39+ - name : Extract Version
40+ uses :
mavrosxristoforos/[email protected] 41+ with :
42+ xml-file : ' {{github.workspace}}/src/SpanExtensions.csproj'
43+ xpath : ' /Project//PropertyGroup//Version'
44+ - name : Store Environment Variable
45+ run : echo "VERSION=v${{ steps.getxml.outputs.info }}" >> $GITHUB_ENV
46+ - name : Download release notes
47+ run : curl -o release-notes.md https://drive.google.com/uc?export=download&id=1LdP8rvPZ9ra4mc4vmv3smcDwVD96Zwn8
48+ - name : Create Tag
49+ run : |
50+ git tag -a ${{ env.Version }}
51+ git push origin ${{ env.Version }}
52+ - name : Create Release
53+ run : gh release create ${{ env.Version }} --title ${{ env.Version }} --notes-file release-notes.md ${{github.workspace}}/Packages/*.nupkg ${{github.workspace}}/Packages/*.snupkg
54+ env :
55+ GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
3656 - name : Push To Nuget
37- run : dotnet nuget push "${{github.workspace}}/Packages/*.nupkg" -k ${{secrets.NUGET_API_KEY_SPANEXTENSIONS}} -s https://api.nuget.org/v3/index.json --skip-duplicate
57+ run : dotnet nuget push "${{github.workspace}}/Packages/*.nupkg" -k ${{secrets.NUGET_API_KEY_SPANEXTENSIONS}} -s https://api.nuget.org/v3/index.json --skip-duplicate
0 commit comments