11name : .NET build and test
22env :
3- CURRENT_VERSION : 2.2 .${{ github.run_number }}
3+ CURRENT_VERSION : 3.0 .${{ github.run_number }}
44 LAST_COMMIT_MESSAGE : ${{ github.event.head_commit.message }}
55
66on :
@@ -18,22 +18,18 @@ jobs:
1818 - name : Setup .NET
1919 uses : actions/setup-dotnet@v3
2020 with :
21- dotnet-version : 7.0.x
22- - name : Setup .NET
23- uses : actions/setup-dotnet@v3
24- with :
25- dotnet-version : 6.0.x
21+ dotnet-version : 8.0.x
26222723 with :
28- node-version : 18
24+ node-version : 20
2925 - name : Restore dependencies
3026 run : dotnet restore
3127 - name : Build
3228 run : dotnet build --configuration Release --no-restore
3329 - name : Publish FolderProfilePortable
34- run : dotnet publish ./Codeuctivity.HtmlRendererCli --configuration Release -f net6 .0 -p:PublishProfile=FolderProfilePortable
30+ run : dotnet publish ./Codeuctivity.HtmlRendererCli --configuration Release -f net8 .0 -p:PublishProfile=FolderProfilePortable
3531 - name : Publish FolderProfileWindows
36- run : dotnet publish ./Codeuctivity.HtmlRendererCli --configuration Release -f net6 .0 -p:PublishProfile=FolderProfileWindows
32+ run : dotnet publish ./Codeuctivity.HtmlRendererCli --configuration Release -f net8 .0 -p:PublishProfile=FolderProfileWindows
3733 - name : Test
3834 run : dotnet test --no-build --verbosity normal --configuration Release
3935 - name : Publish Unit Test Results
@@ -52,43 +48,35 @@ jobs:
5248 - name : Setup .NET
5349 uses : actions/setup-dotnet@v3
5450 with :
55- dotnet-version : 7.0.x
56- - name : Setup .NET
57- uses : actions/setup-dotnet@v3
58- with :
59- dotnet-version : 6.0.x
51+ dotnet-version : 8.0.x
6052 - name : Restore dependencies
6153 run : dotnet restore
6254 - name : Build
6355 run : dotnet build --configuration Release --no-restore
6456 - name : Publish FolderProfilePortable
65- run : dotnet publish ./Codeuctivity.HtmlRendererCli --configuration Release -f net6 .0 -p:PublishProfile=FolderProfilePortable
57+ run : dotnet publish ./Codeuctivity.HtmlRendererCli --configuration Release -f net8 .0 -p:PublishProfile=FolderProfilePortable
6658 - name : Publish FolderProfileWindows
67- run : dotnet publish ./Codeuctivity.HtmlRendererCli --configuration Release -f net6 .0 -p:PublishProfile=FolderProfileWindows
59+ run : dotnet publish ./Codeuctivity.HtmlRendererCli --configuration Release -f net8 .0 -p:PublishProfile=FolderProfileWindows
6860 - name : Zip FolderProfilePortable
6961 uses : thedoctor0/zip-release@main
7062 with :
7163 type : ' zip'
72- directory : ./Codeuctivity.HtmlRendererCli/bin/Release/net6 .0/publish/FolderProfilePortable
64+ directory : ./Codeuctivity.HtmlRendererCli/bin/Release/net8 .0/publish/FolderProfilePortable
7365 filename : ' Codeuctivity.HtmlRendererCli.Portable.zip'
7466 - name : NugetPush
7567 env :
7668 NUGET_TOKEN_EXISTS : ${{ secrets.NUGET_TOKEN }}
7769 if : env.NUGET_TOKEN_EXISTS != ''
7870 run : |
7971 dotnet nuget push ./Codeuctivity.HtmlRenderer/bin/Release/*.nupkg --skip-duplicate --api-key ${{secrets.NUGET_TOKEN}} --source https://api.nuget.org/v3/index.json
80- - uses : " marvinpinto/action-automatic-releases@latest"
81- with :
82- repo_token : " ${{ secrets.GITHUB_TOKEN }}"
83- automatic_release_tag : ${{ env.CURRENT_VERSION }}
84- prerelease : false
85- title : " Release Build"
86- files : |
87- ./Codeuctivity.HtmlRenderer/bin/Release/*.nupkg
88- ./Codeuctivity.HtmlRenderer/bin/Release/*.snupkg
89- ./Codeuctivity.HtmlRendererCli/bin/Release/net6.0/publish/FolderProfilePortable/Codeuctivity.HtmlRendererCli.Portable.zip
90- ./Codeuctivity.HtmlRendererCli/bin/Release/net6.0/publish/FolderProfileWindows/Codeuctivity.HtmlRendererCli.exe
91-
72+ - name : Github Release
73+ shell : bash
74+ env :
75+ GITHUB_TOKEN : ${{ github.TOKEN }}
76+ if : env.GITHUB_TOKEN != ''
77+ run : |
78+ gh release create ${{env.CURRENT_VERSION}} ./Codeuctivity.HtmlRenderer/bin/Release/*.*nupkg ./Codeuctivity.HtmlRendererCli/bin/Release/net8.0/publish/FolderProfilePortable/Codeuctivity.HtmlRendererCli.Portable.zip ./Codeuctivity.HtmlRendererCli/bin/Release/net8.0/publish/FolderProfileWindows/Codeuctivity.HtmlRendererCli.exe --generate-notes
79+
9280 deployTest :
9381 if : github.ref == 'refs/heads/main'
9482 runs-on : ubuntu-latest
@@ -98,24 +86,20 @@ jobs:
9886 - name : Setup .NET
9987 uses : actions/setup-dotnet@v3
10088 with :
101- dotnet-version : 7.0.x
102- - name : Setup .NET
103- uses : actions/setup-dotnet@v3
104- with :
105- dotnet-version : 6.0.x
89+ dotnet-version : 8.0.x
10690 - name : Restore dependencies
10791 run : dotnet restore
10892 - name : Build
10993 run : dotnet build --configuration Release --no-restore
11094 - name : Publish FolderProfilePortable
111- run : dotnet publish ./Codeuctivity.HtmlRendererCli --configuration Release -f net6 .0 -p:PublishProfile=FolderProfilePortable
95+ run : dotnet publish ./Codeuctivity.HtmlRendererCli --configuration Release -f net8 .0 -p:PublishProfile=FolderProfilePortable
11296 - name : Publish FolderProfileWindows
113- run : dotnet publish ./Codeuctivity.HtmlRendererCli --configuration Release -f net6 .0 -p:PublishProfile=FolderProfileWindows
97+ run : dotnet publish ./Codeuctivity.HtmlRendererCli --configuration Release -f net8 .0 -p:PublishProfile=FolderProfileWindows
11498 - name : Zip FolderProfilePortable
11599 uses : thedoctor0/zip-release@main
116100 with :
117101 type : ' zip'
118- directory : ./Codeuctivity.HtmlRendererCli/bin/Release/net6 .0/publish/FolderProfilePortable
102+ directory : ./Codeuctivity.HtmlRendererCli/bin/Release/net8 .0/publish/FolderProfilePortable
119103 filename : ' Codeuctivity.HtmlRendererCli.Portable.zip'
120104 - name : NugetPush
121105 env :
@@ -124,14 +108,11 @@ jobs:
124108 run : |
125109 ls ./Codeuctivity.HtmlRenderer/bin/Release
126110 dotnet nuget push ./Codeuctivity.HtmlRenderer/bin/Release/*.nupkg --skip-duplicate --api-key ${{secrets.NUGET_TEST_TOKEN}} --source https://apiint.nugettest.org/v3/index.json
127- - uses : " marvinpinto/action-automatic-releases@latest"
128- with :
129- repo_token : " ${{ secrets.GITHUB_TOKEN }}"
130- automatic_release_tag : " latest-prerelease"
131- prerelease : true
132- title : " Prerelease Build"
133- files : |
134- ./Codeuctivity.HtmlRenderer/bin/Release/*.nupkg
135- ./Codeuctivity.HtmlRenderer/bin/Release/*.snupkg
136- ./Codeuctivity.HtmlRendererCli/bin/Release/net6.0/publish/FolderProfilePortable/Codeuctivity.HtmlRendererCli.Portable.zip
137- ./Codeuctivity.HtmlRendererCli/bin/Release/net6.0/publish/FolderProfileWindows/Codeuctivity.HtmlRendererCli.exe
111+
112+ - name : Github Prerelease
113+ shell : bash
114+ env :
115+ GITHUB_TOKEN : ${{ github.TOKEN }}
116+ if : env.GITHUB_TOKEN != ''
117+ run : |
118+ gh release create ${{env.CURRENT_VERSION}} ./Codeuctivity.HtmlRenderer/bin/Release/*.*nupkg ./Codeuctivity.HtmlRendererCli/bin/Release/net8.0/publish/FolderProfilePortable/Codeuctivity.HtmlRendererCli.Portable.zip ./Codeuctivity.HtmlRendererCli/bin/Release/net8.0/publish/FolderProfileWindows/Codeuctivity.HtmlRendererCli.exe --prerelease --generate-notes
0 commit comments