Skip to content

Commit 1a4d1e4

Browse files
authored
Merge pull request #357 from codebude/feature/updated-build-scripts
Updated build scripts
2 parents 75e0db1 + 86083ec commit 1a4d1e4

File tree

3 files changed

+68
-20
lines changed

3 files changed

+68
-20
lines changed

.github/workflows/wf-build-release-ci.yml

Lines changed: 33 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -44,15 +44,18 @@ jobs:
4444
run: dotnet test -c Release -f net35 --nologo --no-build # No coverage for NET3.5 because of bug in combination with Coverlet+Stron naming
4545
- name: Run test .NET 4.52
4646
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-
# Skip 1.1 test due to missing support on Github runner
48-
# - name: Run test .NET Core 1.1
49-
# run: dotnet test -c Release -f netcoreapp1.1 --nologo
47+
- name: Run test .NET Core 1.3
48+
run: dotnet test -c Release -f netcoreapp1.3 --nologo /p:CollectCoverage=true /p:CoverletOutputFormat=opencover
5049
- name: Run test .NET Core 2.0
5150
run: dotnet test -c Release -f netcoreapp2.0 --nologo /p:CollectCoverage=true /p:CoverletOutputFormat=opencover
5251
- name: Run test .NET 5.0
5352
run: dotnet test -c Release -f net5.0 --nologo --no-build /p:CollectCoverage=true /p:CoverletOutputFormat=opencover
5453
- name: Run test .NET 5.0 Windows
5554
run: dotnet test -c Release -f net5.0-windows --nologo --no-build /p:CollectCoverage=true /p:CoverletOutputFormat=opencover
55+
- name: Run test .NET 6.0
56+
run: dotnet test -c Release -f net6.0 --nologo --no-build /p:CollectCoverage=true /p:CoverletOutputFormat=opencover
57+
- name: Run test .NET 6.0 Windows
58+
run: dotnet test -c Release -f net6.0-windows --nologo --no-build /p:CollectCoverage=true /p:CoverletOutputFormat=opencover
5659
- name: Codecov update netcoreapp2.0
5760
uses: codecov/codecov-action@v2
5861
with:
@@ -71,6 +74,19 @@ jobs:
7174
token: ${{ secrets.CODECOV_TOKEN }}
7275
files: ./QRCoderTests/coverage.net5.0-windows.opencover.xml
7376
flags: net5.0-windows
77+
- name: Codecov update net6.0
78+
uses: codecov/codecov-action@v2
79+
with:
80+
token: ${{ secrets.CODECOV_TOKEN }}
81+
files: ./QRCoderTests/coverage.net5.0.opencover.xml
82+
flags: net5.0
83+
- name: Codecov update net6.0-windows
84+
uses: codecov/codecov-action@v2
85+
with:
86+
token: ${{ secrets.CODECOV_TOKEN }}
87+
files: ./QRCoderTests/coverage.net5.0-windows.opencover.xml
88+
flags: net5.0-windows
89+
7490

7591
pack-push-ci:
7692
needs: test
@@ -85,15 +101,23 @@ jobs:
85101
path: D:\a\qrcoder\qrcoder
86102
- name: Restore dependencies
87103
run: dotnet restore
88-
- name: Get assembly version
104+
- name: Get assembly version QRCoder
89105
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
90-
- name: Clean assembly version
106+
- name: Clean assembly version QRCoder
91107
run: echo "ASSEM_VER_SHT=$($env:ASSEM_VER.substring(0, $env:ASSEM_VER.lastIndexOf(".")))" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf-8 -Append
92-
- name: Calculate ci suffix
93-
run: echo "CI_TAG=-ci-$([datetime]::now.tostring("yyyyMMddHHmmss"))" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf-8 -Append
94-
- name: Build NuGet package
108+
- name: Calculate ci suffix QRCoder
109+
run: echo "CI_TAG=-ci-$([datetime]::now.tostring("yyyyMMddHHmmss"))" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf-8 -Append
110+
- name: Get assembly version QRCoder.Xaml
111+
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
112+
- name: Clean assembly version QRCoder.Xaml
113+
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
114+
- name: Calculate ci suffix QRCoder.Xaml
115+
run: echo "CI_TAG_XAML=-ci-$([datetime]::now.tostring("yyyyMMddHHmmss"))" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf-8 -Append
116+
- name: Build QRCoder NuGet package
95117
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!"
96-
- name: Publish to Github packages
118+
- name: Build QRCoder.Xaml NuGet package
119+
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!"
120+
- name: Publish QRCoder and QRCoder.Xaml to Github packages
97121
run: dotnet nuget push "**/*.nupkg" --no-symbols --skip-duplicate --api-key $env:GH_PKG_SEC --source https://nuget.pkg.github.com/codebude/index.json
98122

99123

.github/workflows/wf-build-release.yml

Lines changed: 29 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -45,15 +45,18 @@ jobs:
4545
run: dotnet test -c Release -f net35 --nologo --no-build # No coverage for NET3.5 because of bug in combination with Coverlet+Stron naming
4646
- name: Run test .NET 4.52
4747
run: dotnet test -c Release -f net452 --nologo --no-build # No coverage for NET4.5 because of bug in combination with Coverlet+Stron naming
48-
# Skip 1.1 test due to missing support on Github runner
49-
# - name: Run test .NET Core 1.1
50-
# run: dotnet test -c Release -f netcoreapp1.1 --nologo
48+
- name: Run test .NET Core 1.3
49+
run: dotnet test -c Release -f netcoreapp1.3 --nologo /p:CollectCoverage=true /p:CoverletOutputFormat=opencover
5150
- name: Run test .NET Core 2.0
5251
run: dotnet test -c Release -f netcoreapp2.0 --nologo /p:CollectCoverage=true /p:CoverletOutputFormat=opencover
5352
- name: Run test .NET 5.0
5453
run: dotnet test -c Release -f net5.0 --nologo --no-build /p:CollectCoverage=true /p:CoverletOutputFormat=opencover
5554
- name: Run test .NET 5.0 Windows
5655
run: dotnet test -c Release -f net5.0-windows --nologo --no-build /p:CollectCoverage=true /p:CoverletOutputFormat=opencover
56+
- name: Run test .NET 6.0
57+
run: dotnet test -c Release -f net6.0 --nologo --no-build /p:CollectCoverage=true /p:CoverletOutputFormat=opencover
58+
- name: Run test .NET 6.0 Windows
59+
run: dotnet test -c Release -f net6.0-windows --nologo --no-build /p:CollectCoverage=true /p:CoverletOutputFormat=opencover
5760
- name: Codecov update netcoreapp2.0
5861
uses: codecov/codecov-action@v2
5962
with:
@@ -72,6 +75,18 @@ jobs:
7275
token: ${{ secrets.CODECOV_TOKEN }}
7376
files: ./QRCoderTests/coverage.net5.0-windows.opencover.xml
7477
flags: net5.0-windows
78+
- name: Codecov update net6.0
79+
uses: codecov/codecov-action@v2
80+
with:
81+
token: ${{ secrets.CODECOV_TOKEN }}
82+
files: ./QRCoderTests/coverage.net5.0.opencover.xml
83+
flags: net5.0
84+
- name: Codecov update net6.0-windows
85+
uses: codecov/codecov-action@v2
86+
with:
87+
token: ${{ secrets.CODECOV_TOKEN }}
88+
files: ./QRCoderTests/coverage.net5.0-windows.opencover.xml
89+
flags: net5.0-windows
7590

7691
pack-push-release:
7792
needs: test
@@ -86,13 +101,19 @@ jobs:
86101
path: D:\a\qrcoder\qrcoder
87102
- name: Restore dependencies
88103
run: dotnet restore
89-
- name: Get assembly version
104+
- name: Get assembly version QRCoder
90105
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
91-
- name: Clean assembly version
92-
run: echo "ASSEM_VER_SHT=$($env:ASSEM_VER.substring(0, $env:ASSEM_VER.lastIndexOf(".")))" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf-8 -Append
93-
- name: Build NuGet package
106+
- name: Clean assembly version QRCoder
107+
run: echo "ASSEM_VER_SHT=$($env:ASSEM_VER.substring(0, $env:ASSEM_VER.lastIndexOf(".")))" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf-8 -Append
108+
- name: Get assembly version QRCoder.Xaml
109+
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
110+
- name: Clean assembly version QRCoder.Xaml
111+
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
112+
- name: Build QRCoder NuGet package
94113
run: dotnet pack QRCoder\QRCoder.csproj -c Release --no-build /p:PackageVersion="$env:ASSEM_VER_SHT" /p:PackageReleaseNotes="${{ github.event.inputs.releaseNotes }}"
95-
- name: Publish to Github packages
114+
- name: Build QRCoder.Xaml NuGet package
115+
run: dotnet pack QRCoder.Xaml\QRCoder.Xaml.csproj -c Release --no-build /p:PackageVersion="$env:ASSEM_VER_SHT_XAML" /p:PackageReleaseNotes="${{ github.event.inputs.releaseNotes }}"
116+
- name: Publish QRCoder and QRCoder.Xaml to Github packages
96117
run: dotnet nuget push "**/*.nupkg" --no-symbols --skip-duplicate --api-key $env:GH_PKG_SEC --source https://nuget.pkg.github.com/codebude/index.json
97118

98119

.github/workflows/wf-build-test.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,15 +44,18 @@ jobs:
4444
run: dotnet test -c Release -f net35 --nologo --no-build # No coverage for NET3.5 because of bug in combination with Coverlet+Stron naming
4545
- name: Run test .NET 4.52
4646
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-
# Skip 1.1 test due to missing support on Github runner
48-
# - name: Run test .NET Core 1.1
49-
# run: dotnet test -c Release -f netcoreapp1.1 --nologo
47+
- name: Run test .NET Core 1.3
48+
run: dotnet test -c Release -f netcoreapp1.3 --nologo /p:CollectCoverage=true /p:CoverletOutputFormat=opencover
5049
- name: Run test .NET Core 2.0
5150
run: dotnet test -c Release -f netcoreapp2.0 --nologo /p:CollectCoverage=true /p:CoverletOutputFormat=opencover
5251
- name: Run test .NET 5.0
5352
run: dotnet test -c Release -f net5.0 --nologo --no-build /p:CollectCoverage=true /p:CoverletOutputFormat=opencover
5453
- name: Run test .NET 5.0 Windows
5554
run: dotnet test -c Release -f net5.0-windows --nologo --no-build /p:CollectCoverage=true /p:CoverletOutputFormat=opencover
55+
- name: Run test .NET 6.0
56+
run: dotnet test -c Release -f net6.0 --nologo --no-build /p:CollectCoverage=true /p:CoverletOutputFormat=opencover
57+
- name: Run test .NET 6.0 Windows
58+
run: dotnet test -c Release -f net6.0-windows --nologo --no-build /p:CollectCoverage=true /p:CoverletOutputFormat=opencover
5659

5760
clean:
5861
needs: [build, test]

0 commit comments

Comments
 (0)