From 6fc1a30f47f7c8efed505f655bda38d297b40037 Mon Sep 17 00:00:00 2001 From: Zeljko Predjeskovic Date: Sun, 9 Oct 2022 17:43:09 +0200 Subject: [PATCH 1/3] github workflow --- .github/workflows/release.yml | 52 +++++++++++++++++++ .github/workflows/test.yml | 29 +++++++++++ .../DocumentPicker.IOS.csproj | 2 +- .../DocumentConverter.Plugin.csproj | 12 +++-- .../DocumentPicker.Samples.csproj | 2 +- .../DocumentPicker.UWP.csproj | 2 +- .../DocumentConverter.Benchmark.csproj | 2 +- .../DocumentConverter.Tests.csproj | 2 +- .../DocumentConverterServiceTests.cs | 2 - 9 files changed, 94 insertions(+), 11 deletions(-) create mode 100644 .github/workflows/release.yml create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..2dab204 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,52 @@ +name: Release + +on: + pull_request: + branches: [ develop ] + +jobs: + Build: + + env: + SOLUTION: 'iCL.DocumentConverter.sln' + BUILD_CONFIG: 'Release' + + runs-on: [windows-latest] + + steps: + - uses: actions/checkout@v2 + + - name: Setup MSBuild + uses: microsoft/setup-msbuild@v1 + + - name: Setup NuGet + uses: NuGet/setup-nuget@v1.0.5 + + - name: Restore NuGet packages + run: nuget restore $SOLUTION + + - name: Get Git Version + run: | + dotnet tool install --global GitVersion.Tool --version 5.* + dotnet-gitversion + $json=dotnet-gitversion | ConvertFrom-Json + echo "BUILD_VERSION=$json.SemVer" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf-8 -Append + shell: pwsh + + - name: Build the Solution + run: msbuild $SOLUTION /p:Configuration=$env:BUILD_CONFIG /p:Version=$env:BUILD_VERSION + + - name: Archive + uses: actions/upload-artifact@v2 + with: + name: DocumentConverter.Plugin.nuget + path: ./src/DocumentPicker.Plugin/bin/Release/*.nupkg + + # - name: Tag + # run: git tag $BUILD_VERSION + + # - name: Tag Push + # run: git --tag push + + # - name: Publish + # run: nuget push ./src/DocumentPicker.Plugin/bin/Release/*.nupkg -Source 'https://api.nuget.org/v3/index.json' -ApiKey ${{secrets.NUGET_API_KEY}} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..178c0b8 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,29 @@ +name: Test + +on: + pull_request: + branches: [ develop ] + +jobs: + Build: + runs-on: [windows-latest] + + env: + SOLUTION: 'iCL.DocumentConverter.sln' + + steps: + - uses: actions/checkout@v2 + with: + dotnet-version: 6.0.x + + - name: Setup MSBuild + uses: microsoft/setup-msbuild@v1 + + - name: Setup NuGet + uses: NuGet/setup-nuget@v1.0.5 + + - name: Restore NuGet packages + run: nuget restore $SOLUTION + + - name: Execute unit tests + run: dotnet test .\tests\DocumentConverter.Tests\ --no-restore \ No newline at end of file diff --git a/src/DocumentPicker.IOS/DocumentPicker.IOS.csproj b/src/DocumentPicker.IOS/DocumentPicker.IOS.csproj index 71a90b5..1a2bcd7 100644 --- a/src/DocumentPicker.IOS/DocumentPicker.IOS.csproj +++ b/src/DocumentPicker.IOS/DocumentPicker.IOS.csproj @@ -82,7 +82,7 @@ - + 2.4.3.5 diff --git a/src/DocumentPicker.Plugin/DocumentConverter.Plugin.csproj b/src/DocumentPicker.Plugin/DocumentConverter.Plugin.csproj index bd0f1f8..2d1d04d 100644 --- a/src/DocumentPicker.Plugin/DocumentConverter.Plugin.csproj +++ b/src/DocumentPicker.Plugin/DocumentConverter.Plugin.csproj @@ -1,12 +1,18 @@ - + netstandard2.0;MonoAndroid90;Xamarin.iOS10;uap10.0.17763 + Optiq.DocumentConverter.PdfToSvg + 1.0.0 + + true + + - + @@ -18,8 +24,6 @@ - - diff --git a/src/DocumentPicker.Sample/DocumentPicker.Samples.csproj b/src/DocumentPicker.Sample/DocumentPicker.Samples.csproj index db7a39c..eb20ff2 100644 --- a/src/DocumentPicker.Sample/DocumentPicker.Samples.csproj +++ b/src/DocumentPicker.Sample/DocumentPicker.Samples.csproj @@ -5,7 +5,7 @@ - + diff --git a/src/DocumentPicker.UWP/DocumentPicker.UWP.csproj b/src/DocumentPicker.UWP/DocumentPicker.UWP.csproj index 6a22a75..45ca2e3 100644 --- a/src/DocumentPicker.UWP/DocumentPicker.UWP.csproj +++ b/src/DocumentPicker.UWP/DocumentPicker.UWP.csproj @@ -153,7 +153,7 @@ 6.2.14 - + 2.4.3.5 diff --git a/tests/DocumentConverter.Benchmark/DocumentConverter.Benchmark.csproj b/tests/DocumentConverter.Benchmark/DocumentConverter.Benchmark.csproj index 73b959a..491d4c9 100644 --- a/tests/DocumentConverter.Benchmark/DocumentConverter.Benchmark.csproj +++ b/tests/DocumentConverter.Benchmark/DocumentConverter.Benchmark.csproj @@ -36,7 +36,7 @@ - + diff --git a/tests/DocumentConverter.Tests/DocumentConverter.Tests.csproj b/tests/DocumentConverter.Tests/DocumentConverter.Tests.csproj index 5dbd5c0..8f6fbd6 100644 --- a/tests/DocumentConverter.Tests/DocumentConverter.Tests.csproj +++ b/tests/DocumentConverter.Tests/DocumentConverter.Tests.csproj @@ -48,8 +48,8 @@ + - diff --git a/tests/DocumentConverter.Tests/DocumentConverterServiceTests.cs b/tests/DocumentConverter.Tests/DocumentConverterServiceTests.cs index 8b7cfd1..ba15d96 100644 --- a/tests/DocumentConverter.Tests/DocumentConverterServiceTests.cs +++ b/tests/DocumentConverter.Tests/DocumentConverterServiceTests.cs @@ -1,7 +1,5 @@ using DocumentConverter.Plugin.Shared; -using DocumentConverter.Plugin.Shared.Picker; using DocumentConverter.Plugin.Shared.StreamProvider; -using Moq; using Shouldly; using Svg; From e6980fddfeece9aa1f79a9e734b9eacfb2135b31 Mon Sep 17 00:00:00 2001 From: Zeljko Predjeskovic Date: Thu, 20 Oct 2022 09:33:27 +0200 Subject: [PATCH 2/3] pipeline update --- .github/workflows/release.yml | 16 ++++++++-------- src/DocumentPicker.IOS/DocumentPicker.IOS.csproj | 4 ++-- .../DocumentConverter.Plugin.csproj | 4 ++-- .../DocumentPicker.Samples.csproj | 2 +- src/DocumentPicker.UWP/DocumentPicker.UWP.csproj | 4 ++-- .../DocumentConverter.Benchmark.csproj | 2 +- .../DocumentConverter.Tests.csproj | 2 +- 7 files changed, 17 insertions(+), 17 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2dab204..1bedf3d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -25,16 +25,16 @@ jobs: - name: Restore NuGet packages run: nuget restore $SOLUTION - - name: Get Git Version - run: | - dotnet tool install --global GitVersion.Tool --version 5.* - dotnet-gitversion - $json=dotnet-gitversion | ConvertFrom-Json - echo "BUILD_VERSION=$json.SemVer" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf-8 -Append - shell: pwsh + # - name: Get Git Version + # run: | + # dotnet tool install --global GitVersion.Tool --version 5.* + # dotnet-gitversion + # $json=dotnet-gitversion | ConvertFrom-Json + # echo "BUILD_VERSION=$json.SemVer" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf-8 -Append + # shell: pwsh - name: Build the Solution - run: msbuild $SOLUTION /p:Configuration=$env:BUILD_CONFIG /p:Version=$env:BUILD_VERSION + run: msbuild $SOLUTION /p:Configuration=$env:BUILD_CONFIG /p:Version=1.0.0 #$env:BUILD_VERSION - name: Archive uses: actions/upload-artifact@v2 diff --git a/src/DocumentPicker.IOS/DocumentPicker.IOS.csproj b/src/DocumentPicker.IOS/DocumentPicker.IOS.csproj index 1a2bcd7..68a2613 100644 --- a/src/DocumentPicker.IOS/DocumentPicker.IOS.csproj +++ b/src/DocumentPicker.IOS/DocumentPicker.IOS.csproj @@ -82,8 +82,8 @@ - - 2.4.3.5 + + 2.4.3.7 diff --git a/src/DocumentPicker.Plugin/DocumentConverter.Plugin.csproj b/src/DocumentPicker.Plugin/DocumentConverter.Plugin.csproj index 2d1d04d..dfc62a5 100644 --- a/src/DocumentPicker.Plugin/DocumentConverter.Plugin.csproj +++ b/src/DocumentPicker.Plugin/DocumentConverter.Plugin.csproj @@ -3,7 +3,7 @@ netstandard2.0;MonoAndroid90;Xamarin.iOS10;uap10.0.17763 Optiq.DocumentConverter.PdfToSvg - 1.0.0 + 1.0.1 @@ -12,7 +12,7 @@ - + diff --git a/src/DocumentPicker.Sample/DocumentPicker.Samples.csproj b/src/DocumentPicker.Sample/DocumentPicker.Samples.csproj index eb20ff2..5252a28 100644 --- a/src/DocumentPicker.Sample/DocumentPicker.Samples.csproj +++ b/src/DocumentPicker.Sample/DocumentPicker.Samples.csproj @@ -5,7 +5,7 @@ - + diff --git a/src/DocumentPicker.UWP/DocumentPicker.UWP.csproj b/src/DocumentPicker.UWP/DocumentPicker.UWP.csproj index 45ca2e3..d6fd236 100644 --- a/src/DocumentPicker.UWP/DocumentPicker.UWP.csproj +++ b/src/DocumentPicker.UWP/DocumentPicker.UWP.csproj @@ -153,8 +153,8 @@ 6.2.14 - - 2.4.3.5 + + 2.4.3.7 1.6.1 diff --git a/tests/DocumentConverter.Benchmark/DocumentConverter.Benchmark.csproj b/tests/DocumentConverter.Benchmark/DocumentConverter.Benchmark.csproj index 491d4c9..7dc6f86 100644 --- a/tests/DocumentConverter.Benchmark/DocumentConverter.Benchmark.csproj +++ b/tests/DocumentConverter.Benchmark/DocumentConverter.Benchmark.csproj @@ -36,7 +36,7 @@ - + diff --git a/tests/DocumentConverter.Tests/DocumentConverter.Tests.csproj b/tests/DocumentConverter.Tests/DocumentConverter.Tests.csproj index 8f6fbd6..f95808b 100644 --- a/tests/DocumentConverter.Tests/DocumentConverter.Tests.csproj +++ b/tests/DocumentConverter.Tests/DocumentConverter.Tests.csproj @@ -48,8 +48,8 @@ - + From f1b72e9f48a3dbedfbea78aae8650cd1e6e9104c Mon Sep 17 00:00:00 2001 From: Zeljko Predjeskovic Date: Thu, 20 Oct 2022 09:47:31 +0200 Subject: [PATCH 3/3] pipeline update --- src/DocumentPicker.IOS/DocumentPicker.IOS.csproj | 4 ++-- src/DocumentPicker.Plugin/DocumentConverter.Plugin.csproj | 2 +- src/DocumentPicker.Sample/DocumentPicker.Samples.csproj | 2 +- src/DocumentPicker.UWP/DocumentPicker.UWP.csproj | 4 ++-- .../DocumentConverter.Benchmark.csproj | 2 +- tests/DocumentConverter.Tests/DocumentConverter.Tests.csproj | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/DocumentPicker.IOS/DocumentPicker.IOS.csproj b/src/DocumentPicker.IOS/DocumentPicker.IOS.csproj index 68a2613..1a2bcd7 100644 --- a/src/DocumentPicker.IOS/DocumentPicker.IOS.csproj +++ b/src/DocumentPicker.IOS/DocumentPicker.IOS.csproj @@ -82,8 +82,8 @@ - - 2.4.3.7 + + 2.4.3.5 diff --git a/src/DocumentPicker.Plugin/DocumentConverter.Plugin.csproj b/src/DocumentPicker.Plugin/DocumentConverter.Plugin.csproj index dfc62a5..528a059 100644 --- a/src/DocumentPicker.Plugin/DocumentConverter.Plugin.csproj +++ b/src/DocumentPicker.Plugin/DocumentConverter.Plugin.csproj @@ -12,7 +12,7 @@ - + diff --git a/src/DocumentPicker.Sample/DocumentPicker.Samples.csproj b/src/DocumentPicker.Sample/DocumentPicker.Samples.csproj index 5252a28..eb20ff2 100644 --- a/src/DocumentPicker.Sample/DocumentPicker.Samples.csproj +++ b/src/DocumentPicker.Sample/DocumentPicker.Samples.csproj @@ -5,7 +5,7 @@ - + diff --git a/src/DocumentPicker.UWP/DocumentPicker.UWP.csproj b/src/DocumentPicker.UWP/DocumentPicker.UWP.csproj index d6fd236..45ca2e3 100644 --- a/src/DocumentPicker.UWP/DocumentPicker.UWP.csproj +++ b/src/DocumentPicker.UWP/DocumentPicker.UWP.csproj @@ -153,8 +153,8 @@ 6.2.14 - - 2.4.3.7 + + 2.4.3.5 1.6.1 diff --git a/tests/DocumentConverter.Benchmark/DocumentConverter.Benchmark.csproj b/tests/DocumentConverter.Benchmark/DocumentConverter.Benchmark.csproj index 7dc6f86..491d4c9 100644 --- a/tests/DocumentConverter.Benchmark/DocumentConverter.Benchmark.csproj +++ b/tests/DocumentConverter.Benchmark/DocumentConverter.Benchmark.csproj @@ -36,7 +36,7 @@ - + diff --git a/tests/DocumentConverter.Tests/DocumentConverter.Tests.csproj b/tests/DocumentConverter.Tests/DocumentConverter.Tests.csproj index f95808b..8f6fbd6 100644 --- a/tests/DocumentConverter.Tests/DocumentConverter.Tests.csproj +++ b/tests/DocumentConverter.Tests/DocumentConverter.Tests.csproj @@ -48,8 +48,8 @@ + -