1
1
name : .NET build and test
2
2
env :
3
- CURRENT_VERSION : 2.2 .${{ github.run_number }}
3
+ CURRENT_VERSION : 3.0 .${{ github.run_number }}
4
4
LAST_COMMIT_MESSAGE : ${{ github.event.head_commit.message }}
5
5
6
6
on :
@@ -18,22 +18,18 @@ jobs:
18
18
- name : Setup .NET
19
19
uses : actions/setup-dotnet@v3
20
20
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
26
22
27
23
with :
28
- node-version : 18
24
+ node-version : 20
29
25
- name : Restore dependencies
30
26
run : dotnet restore
31
27
- name : Build
32
28
run : dotnet build --configuration Release --no-restore
33
29
- 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
35
31
- 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
37
33
- name : Test
38
34
run : dotnet test --no-build --verbosity normal --configuration Release
39
35
- name : Publish Unit Test Results
@@ -52,43 +48,35 @@ jobs:
52
48
- name : Setup .NET
53
49
uses : actions/setup-dotnet@v3
54
50
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
60
52
- name : Restore dependencies
61
53
run : dotnet restore
62
54
- name : Build
63
55
run : dotnet build --configuration Release --no-restore
64
56
- 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
66
58
- 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
68
60
- name : Zip FolderProfilePortable
69
61
uses : thedoctor0/zip-release@main
70
62
with :
71
63
type : ' zip'
72
- directory : ./Codeuctivity.HtmlRendererCli/bin/Release/net6 .0/publish/FolderProfilePortable
64
+ directory : ./Codeuctivity.HtmlRendererCli/bin/Release/net8 .0/publish/FolderProfilePortable
73
65
filename : ' Codeuctivity.HtmlRendererCli.Portable.zip'
74
66
- name : NugetPush
75
67
env :
76
68
NUGET_TOKEN_EXISTS : ${{ secrets.NUGET_TOKEN }}
77
69
if : env.NUGET_TOKEN_EXISTS != ''
78
70
run : |
79
71
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
+
92
80
deployTest :
93
81
if : github.ref == 'refs/heads/main'
94
82
runs-on : ubuntu-latest
@@ -98,24 +86,20 @@ jobs:
98
86
- name : Setup .NET
99
87
uses : actions/setup-dotnet@v3
100
88
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
106
90
- name : Restore dependencies
107
91
run : dotnet restore
108
92
- name : Build
109
93
run : dotnet build --configuration Release --no-restore
110
94
- 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
112
96
- 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
114
98
- name : Zip FolderProfilePortable
115
99
uses : thedoctor0/zip-release@main
116
100
with :
117
101
type : ' zip'
118
- directory : ./Codeuctivity.HtmlRendererCli/bin/Release/net6 .0/publish/FolderProfilePortable
102
+ directory : ./Codeuctivity.HtmlRendererCli/bin/Release/net8 .0/publish/FolderProfilePortable
119
103
filename : ' Codeuctivity.HtmlRendererCli.Portable.zip'
120
104
- name : NugetPush
121
105
env :
@@ -124,14 +108,11 @@ jobs:
124
108
run : |
125
109
ls ./Codeuctivity.HtmlRenderer/bin/Release
126
110
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