13
13
- uses : actions/checkout@v1
14
14
name : Checkout Code
15
15
16
+ - name : Install .NET 6
17
+ uses : actions/setup-dotnet@v1
18
+ with :
19
+ dotnet-version : ' 6.0.x'
20
+
16
21
- name : Setup MSBuild Path
17
22
uses : microsoft/setup-msbuild@v1
18
23
@@ -40,52 +45,71 @@ jobs:
40
45
with :
41
46
name : Compiled project
42
47
path : D:\a\qrcoder\qrcoder
48
+
49
+ - name : Install .NET 6
50
+ uses : actions/setup-dotnet@v1
51
+ with :
52
+ dotnet-version : ' 6.0.x'
53
+
43
54
- name : Run test .NET 3.5
44
55
run : dotnet test -c Release -f net35 --nologo --no-build # No coverage for NET3.5 because of bug in combination with Coverlet+Stron naming
56
+
45
57
- name : Run test .NET 4.52
46
58
run : dotnet test -c Release -f net452 --nologo --no-build # No coverage for NET4.5 because of bug in combination with Coverlet+Stron naming
47
- - name : Run test .NET Core 1.3
48
- run : dotnet test -c Release -f netcoreapp1.3 --nologo /p:CollectCoverage=true /p:CoverletOutputFormat=opencover
59
+
60
+ # Skip 1.3 test due to missing support on Github runner
61
+ # - name: Run test .NET Core 1.3
62
+ # run: dotnet test -c Release -f netcoreapp1.3 --nologo
63
+
49
64
- name : Run test .NET Core 2.0
50
65
run : dotnet test -c Release -f netcoreapp2.0 --nologo /p:CollectCoverage=true /p:CoverletOutputFormat=opencover
66
+
51
67
- name : Run test .NET 5.0
52
68
run : dotnet test -c Release -f net5.0 --nologo --no-build /p:CollectCoverage=true /p:CoverletOutputFormat=opencover
69
+
53
70
- name : Run test .NET 5.0 Windows
54
71
run : dotnet test -c Release -f net5.0-windows --nologo --no-build /p:CollectCoverage=true /p:CoverletOutputFormat=opencover
72
+
55
73
- name : Run test .NET 6.0
56
74
run : dotnet test -c Release -f net6.0 --nologo --no-build /p:CollectCoverage=true /p:CoverletOutputFormat=opencover
75
+
57
76
- name : Run test .NET 6.0 Windows
58
77
run : dotnet test -c Release -f net6.0-windows --nologo --no-build /p:CollectCoverage=true /p:CoverletOutputFormat=opencover
78
+
59
79
- name : Codecov update netcoreapp2.0
60
80
uses : codecov/codecov-action@v2
61
81
with :
62
82
token : ${{ secrets.CODECOV_TOKEN }}
63
83
files : ./QRCoderTests/coverage.netcoreapp2.0.opencover.xml
64
84
flags : netcoreapp2.0
85
+
65
86
- name : Codecov update net5.0
66
87
uses : codecov/codecov-action@v2
67
88
with :
68
89
token : ${{ secrets.CODECOV_TOKEN }}
69
90
files : ./QRCoderTests/coverage.net5.0.opencover.xml
70
91
flags : net5.0
92
+
71
93
- name : Codecov update net5.0-windows
72
94
uses : codecov/codecov-action@v2
73
95
with :
74
96
token : ${{ secrets.CODECOV_TOKEN }}
75
97
files : ./QRCoderTests/coverage.net5.0-windows.opencover.xml
76
98
flags : net5.0-windows
99
+
77
100
- name : Codecov update net6.0
78
101
uses : codecov/codecov-action@v2
79
102
with :
80
103
token : ${{ secrets.CODECOV_TOKEN }}
81
104
files : ./QRCoderTests/coverage.net5.0.opencover.xml
82
- flags : net5.0
105
+ flags : net6.0
106
+
83
107
- name : Codecov update net6.0-windows
84
108
uses : codecov/codecov-action@v2
85
109
with :
86
110
token : ${{ secrets.CODECOV_TOKEN }}
87
111
files : ./QRCoderTests/coverage.net5.0-windows.opencover.xml
88
- flags : net5 .0-windows
112
+ flags : net6 .0-windows
89
113
90
114
91
115
pack-push-ci :
@@ -99,24 +123,39 @@ jobs:
99
123
with :
100
124
name : Compiled project
101
125
path : D:\a\qrcoder\qrcoder
126
+
127
+ - name : Install .NET 6
128
+ uses : actions/setup-dotnet@v1
129
+ with :
130
+ dotnet-version : ' 6.0.x'
131
+
102
132
- name : Restore dependencies
103
133
run : dotnet restore
134
+
104
135
- name : Get assembly version QRCoder
105
136
run : echo "ASSEM_VER=$([Reflection.Assembly]::Loadfile( $(-join($pwd,"\QRCoder\bin\Release\net40\QRCoder.dll"))).GetName().version.ToString())" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf-8 -Append
137
+
106
138
- name : Clean assembly version QRCoder
107
139
run : echo "ASSEM_VER_SHT=$($env:ASSEM_VER.substring(0, $env:ASSEM_VER.lastIndexOf(".")))" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf-8 -Append
140
+
108
141
- name : Calculate ci suffix QRCoder
109
142
run : echo "CI_TAG=-ci-$([datetime]::now.tostring("yyyyMMddHHmmss"))" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf-8 -Append
143
+
110
144
- name : Get assembly version QRCoder.Xaml
111
145
run : echo "ASSEM_VER_XAML=$([Reflection.Assembly]::Loadfile( $(-join($pwd,"\QRCoder.Xaml\bin\Release\net40\QRCoder.Xaml.dll"))).GetName().version.ToString())" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf-8 -Append
146
+
112
147
- name : Clean assembly version QRCoder.Xaml
113
148
run : echo "ASSEM_VER_SHT_XAML=$($env:ASSEM_VER_XAML.substring(0, $env:ASSEM_VER_XAML.lastIndexOf(".")))" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf-8 -Append
149
+
114
150
- name : Calculate ci suffix QRCoder.Xaml
115
151
run : echo "CI_TAG_XAML=-ci-$([datetime]::now.tostring("yyyyMMddHHmmss"))" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf-8 -Append
152
+
116
153
- name : Build QRCoder NuGet package
117
154
run : dotnet pack QRCoder\QRCoder.csproj -c Release --no-build /p:PackageVersion="$env:ASSEM_VER_SHT$env:CI_TAG" /p:PackageReleaseNotes="- This is an automatic CI build ($env:CI_TAG)`n- Please don't use it in productive environments!"
155
+
118
156
- name : Build QRCoder.Xaml NuGet package
119
157
run : dotnet pack QRCoder.Xaml\QRCoder.Xaml.csproj -c Release --no-build /p:PackageVersion="$env:ASSEM_VER_SHT_XAML$env:CI_TAG_XAML" /p:PackageReleaseNotes="- This is an automatic CI build ($env:CI_TAG_XAML)`n- Please don't use it in productive environments!"
158
+
120
159
- name : Publish QRCoder and QRCoder.Xaml to Github packages
121
160
run : dotnet nuget push "**/*.nupkg" --no-symbols --skip-duplicate --api-key $env:GH_PKG_SEC --source https://nuget.pkg.github.com/codebude/index.json
122
161
0 commit comments