Add net10.0 instead of net6.0 #122
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build AvalonEdit | |
| on: | |
| push: | |
| branches: [ master ] | |
| pull_request: | |
| branches: [ master ] | |
| jobs: | |
| build: | |
| runs-on: windows-2022 | |
| strategy: | |
| matrix: | |
| Configuration: [ Debug, Release ] | |
| env: | |
| Solution: '**/ICSharpCode.AvalonEdit.sln' | |
| BuildPlatform: 'Any CPU' | |
| BuildVersion: '6.3.2' | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Update project version | |
| uses: roryprimrose/set-vs-sdk-project-version@v1 | |
| with: | |
| projectFilter: '**/ICSharpCode.AvalonEdit.csproj' | |
| version: ${{ env.BuildVersion }}.${{ github.run_number }} | |
| assemblyVersion: ${{ env.BuildVersion }}.${{ github.run_number }} | |
| fileVersion: ${{ env.BuildVersion }}.${{ github.run_number }} | |
| - name: Setup .NET LTS Current | |
| uses: actions/setup-dotnet@v5 | |
| with: | |
| dotnet-version: '10.0.x' | |
| - name: Setup .NET LTS Previous | |
| uses: actions/setup-dotnet@v5 | |
| with: | |
| dotnet-version: '8.0.x' | |
| - name: Add msbuild to PATH | |
| uses: microsoft/setup-msbuild@v2 | |
| - run: msbuild ICSharpCode.AvalonEdit.sln /t:Restore /p:Configuration=${{ matrix.configuration }} | |
| - name: Build | |
| run: msbuild ICSharpCode.AvalonEdit.sln /p:Configuration=${{ matrix.configuration }} | |
| - name: Setup VSTest | |
| uses: Malcolmnixon/Setup-VSTest@v4 | |
| - name: LTS Current Unit Tests | |
| run: vstest.console $env:TestAssembly | |
| env: | |
| TestAssembly: ICSharpCode.AvalonEdit.Tests\bin\${{ matrix.configuration }}\net10.0-windows\ICSharpCode.AvalonEdit.Tests.dll | |
| - name: LTS Previous Unit Tests | |
| run: vstest.console $env:TestAssembly | |
| env: | |
| TestAssembly: ICSharpCode.AvalonEdit.Tests\bin\${{ matrix.configuration }}\net8.0-windows\ICSharpCode.AvalonEdit.Tests.dll | |
| - name: net462 Unit Tests | |
| run: vstest.console $env:TestAssembly | |
| env: | |
| TestAssembly: ICSharpCode.AvalonEdit.Tests\bin\${{ matrix.configuration }}\net462\ICSharpCode.AvalonEdit.Tests.dll | |
| - name: Style - tab check | |
| run: python BuildTools\tidy.py | |
| - name: Pack | |
| run: dotnet pack ICSharpCode.AvalonEdit/ICSharpCode.AvalonEdit.csproj -c ${{ matrix.configuration }} | |
| - name: Upload NuGet | |
| if: matrix.configuration == 'release' | |
| uses: actions/upload-artifact@v5 | |
| with: | |
| name: AvalonEdit NuGet Package (${{ matrix.configuration }}) | |
| path: ICSharpCode.AvalonEdit/bin/Release/AvalonEdit*.nupkg | |
| if-no-files-found: error | |
| - name: Upload Snupkg Artifact | |
| if: matrix.configuration == 'release' | |
| uses: actions/upload-artifact@v5 | |
| with: | |
| name: AvalonEdit Snupkg (${{ matrix.configuration }}) | |
| path: ICSharpCode.AvalonEdit/bin/Release/AvalonEdit*.snupkg | |
| if-no-files-found: error | |
| - name: Publish NuGet | |
| if: github.ref == 'refs/heads/master' && matrix.configuration == 'release' | |
| run: | | |
| dotnet nuget push "ICSharpCode.AvalonEdit\bin\Release\AvalonEdit*.nupkg" --api-key ${{ secrets.GITHUB_TOKEN }} --source https://nuget.pkg.github.com/${{ github.repository_owner }} |