Skip to content

Commit

Permalink
Updated examples versions (#358)
Browse files Browse the repository at this point in the history
  • Loading branch information
falleretic authored Nov 20, 2023
1 parent 1fec563 commit 1860c63
Show file tree
Hide file tree
Showing 9 changed files with 133 additions and 22 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Create pull request
on: workflow_dispatch

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Create Pull Request
uses: peter-evans/create-pull-request@v4
with:
commit-message: Updated API version
base: aspose-words/Aspose.Words-for-.NET/main
branch: falleretic/Aspose.Words-for-.NET/main
41 changes: 41 additions & 0 deletions .github/workflows/run_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Run API tests
on:
push:
workflow_dispatch:

jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v3
- name: Install fonts
run: dism /online /enable-feature /featurename:ServerCoreFonts-NonCritical-Fonts-TrueType /Source:O:\ /LimitAccess
- name: Build ENV
run: mkdir ./Examples/Data/License/
- name: Add total license
uses: timheuer/[email protected]
with:
fileName: 'Aspose.Total.NET.lic'
fileDir: './Examples/Data/License/'
encodedString: ${{ secrets.API_LICENSE }}
- name: Add words license
uses: timheuer/[email protected]
with:
fileName: 'Aspose.Words.NET.lic'
fileDir: './Examples/Data/License/'
encodedString: ${{ secrets.API_WORDS_LICENSE }}
- name: Restore dependencies
run: dotnet restore ./Examples/ApiExamples/ApiExamples/ApiExamples.csproj
- name: Build
run: dotnet build --no-restore ./Examples/ApiExamples/ApiExamples/ApiExamples.csproj
- name: Test
run: dotnet test --no-build --verbosity normal --logger trx --results-directory "TestResults" ./Examples/ApiExamples/ApiExamples/ApiExamples.csproj
- name: Upload dotnet test results
uses: actions/upload-artifact@v3
with:
name: test-results
path: TestResults
# Use always() to always run this step to publish test results when there are test failures
if: ${{ always() }}
55 changes: 55 additions & 0 deletions .github/workflows/update_packages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Update nuget packages
on: workflow_dispatch

jobs:
update_packages:
runs-on: windows-latest
steps:
# Sync branch
- uses: actions/checkout@v4
- uses: actions/setup-dotnet@v3

# Restore packages
- name: Install dependencies ApiExamples
run: dotnet restore ./Examples/ApiExamples/ApiExamples/ApiExamples.csproj
- name: Install dependencies DocsExamples
run: dotnet restore ./Examples/DocsExamples/DocsExamples/DocsExamples.csproj
- name: Install dependencies ApiExamples.MAUI
run: dotnet restore ./Examples/ApiExamples/Runner.MAUI/Runner.MAUI.csproj
- name: Install dependencies Docker
run: dotnet restore ./Examples/DocsExamples/Docker/Docker.csproj
- name: Install dependencies DocumentExplorer
run: dotnet restore ./Examples/DocsExamples/DocumentExplorer/DocumentExplorer.csproj

# Update packages
- name: Install dotnet-outdated-tool
run: dotnet tool install --global dotnet-outdated-tool

- name: Update packages
run: |
cd Examples
OUTPUT=$(dotnet outdated -r)
if [[ $OUTPUT =~ "No outdated dependencies" ]]; then
echo "::set-output name=updated::false"
else
dotnet outdated -u -r
echo "::set-output name=updated::true"
fi
shell: bash

# Check build
- name: Build ApiExamples
run: dotnet build ./Examples/ApiExamples/ApiExamples/ApiExamples.csproj
- name: Build ApiExamples.MAUI
run: dotnet build ./Examples/ApiExamples/Runner.MAUI/Runner.MAUI.csproj
- name: Build DocsExamples
run: dotnet build ./Examples/DocsExamples/DocsExamples/DocsExamples.csproj

# Commit changes
- name: Commit changes
run: |
git config user.name github-actions
git config user.email [email protected]
git add .
git commit -m "Updated API versions"
git push
16 changes: 8 additions & 8 deletions Examples/ApiExamples/ApiExamples/ApiExamples.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -124,20 +124,20 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Aspose.BarCode" Version="23.9.0" />
<PackageReference Include="Aspose.BarCode" Version="23.10.0" />
<PackageReference Include="Aspose.Page" Version="23.10.0" />
<PackageReference Include="Aspose.PDF" Version="23.9.0" />
<PackageReference Include="Aspose.Words" Version="23.10.0" />
<PackageReference Include="Aspose.Words.Shaping.HarfBuzz" Version="23.10.0" />
<PackageReference Include="Aspose.PDF" Version="23.11.0" />
<PackageReference Include="Aspose.Words" Version="23.11.0" />
<PackageReference Include="Aspose.Words.Shaping.HarfBuzz" Version="23.11.0" />
<PackageReference Include="BouncyCastle.Cryptography" Version="2.2.1" />
<PackageReference Include="Microsoft.Extensions.Http" Version="7.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.7.2" />
<PackageReference Include="NUnit" Version="3.13.3" />
<PackageReference Include="Microsoft.Extensions.Http" Version="8.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
<PackageReference Include="NUnit" Version="3.14.0" />
<PackageReference Include="NUnit3TestAdapter" Version="4.5.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
<PackageReference Include="System.Data.OleDb" Version="7.0.0" />
<PackageReference Include="System.Data.OleDb" Version="8.0.0" />
<PackageReference Include="System.IO.Compression" Version="4.3.0" />
<PackageReference Include="System.Runtime.InteropServices.RuntimeInformation" Version="4.3.0" />
</ItemGroup>
Expand Down
6 changes: 3 additions & 3 deletions Examples/ApiExamples/Runner.MAUI/Runner.MAUI.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@

<ItemGroup>
<PackageReference Include="Aspose.Page" Version="23.10.0" />
<PackageReference Include="Aspose.PDF" Version="23.9.0" />
<PackageReference Include="Aspose.Words" Version="23.10.0" />
<PackageReference Include="Aspose.Words.Shaping.HarfBuzz" Version="23.10.0" />
<PackageReference Include="Aspose.PDF" Version="23.11.0" />
<PackageReference Include="Aspose.Words" Version="23.11.0" />
<PackageReference Include="Aspose.Words.Shaping.HarfBuzz" Version="23.11.0" />
<PackageReference Include="Shiny.Xunit.Runners.Maui" Version="1.0.0" />
<PackageReference Include="SkiaSharp" Version="2.88.6" />
</ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion Examples/DocsExamples/Docker/Docker.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Aspose.Words" Version="23.10.0" />
<PackageReference Include="Aspose.Words" Version="23.11.0" />
</ItemGroup>

</Project>
12 changes: 6 additions & 6 deletions Examples/DocsExamples/DocsExamples/DocsExamples.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -117,13 +117,13 @@

<ItemGroup>
<PackageReference Include="Aspose.BarCode" Version="23.10.0" />
<PackageReference Include="Aspose.Email" Version="23.9.0" />
<PackageReference Include="Aspose.Words" Version="23.10.0" />
<PackageReference Include="Aspose.Words.Shaping.HarfBuzz" Version="23.10.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.7.2" />
<PackageReference Include="NUnit" Version="3.13.3" />
<PackageReference Include="Aspose.Email" Version="23.10.0" />
<PackageReference Include="Aspose.Words" Version="23.11.0" />
<PackageReference Include="Aspose.Words.Shaping.HarfBuzz" Version="23.11.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
<PackageReference Include="NUnit" Version="3.14.0" />
<PackageReference Include="NUnit3TestAdapter" Version="4.5.0" />
<PackageReference Include="System.Data.OleDb" Version="7.0.0" />
<PackageReference Include="System.Data.OleDb" Version="8.0.0" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,10 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Aspose.Words">
<Version>23.9.0</Version>
<Version>23.11.0</Version>
</PackageReference>
<PackageReference Include="Aspose.Words" Version="23.10.0" />
<PackageReference Include="Aspose.Words" Version="23.11.0" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
6 changes: 3 additions & 3 deletions Examples/DocsExamples/PluginsExamples/PluginsExamples.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Aspose.Words" Version="23.10.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.7.2" />
<PackageReference Include="NUnit" Version="3.13.3" />
<PackageReference Include="Aspose.Words" Version="23.11.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
<PackageReference Include="NUnit" Version="3.14.0" />
<PackageReference Include="NUnit3TestAdapter" Version="4.5.0" />
</ItemGroup>

Expand Down

0 comments on commit 1860c63

Please sign in to comment.