556 compatibility inquiry avaloniaui #91
This file contains 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
# This workflow will build a .NET project | |
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net | |
name: .NET | |
on: | |
push: | |
branches: [ "master" ] | |
pull_request: | |
branches: [ "master" ] | |
env: | |
caliburn_sln : "src\\caliburn.micro.sln" | |
caliburn_tutorial: "samples\\tutorals\\WPF\\Wpf.Tutorial\\Caliburn.Micro.Tutorial.App.sln" | |
caliburn_setup: "samples\\setup\\setup.sln" | |
caliburn_features: "samples\\features\\features.sln" | |
package_feed: "https://nuget.pkg.github.com/caliburn-micro/index.json" | |
nuget_folder: "\\packages" | |
build_configuration: "Release" | |
jobs: | |
build: | |
runs-on: windows-2022 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 # avoid shallow clone so nbgv can do its work | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: 8.0.x | |
- name: Setup Java SDK | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'microsoft' | |
java-version: 17 | |
- name: Setup NuGet.exe for use with actions | |
# You may pin to the exact commit or the version. | |
# uses: NuGet/setup-nuget@fd9fffd6ca4541cf4152a9565835ca1a88a6eb37 | |
uses: NuGet/setup-nuget@v2 | |
- name: Add msbuild to PATH | |
uses: microsoft/setup-msbuild@v2 | |
- name: search workloads | |
run: dotnet workload search | |
- name: restore workloads | |
run: dotnet workload install maui maui-android maui-ios maui-tizen maui-maccatalyst maui-windows android --source https://api.nuget.org/v3/index.json | |
- name: list workloads | |
run: dotnet workload list | |
- name: Ensure GitHub NuGet Source | |
run: dotnet nuget add source ${{ env.package_feed }} | |
-n github | |
-u ${{ secrets.NUGET_USER }} | |
-p ${{ secrets.CONSUME_CALIBURN_FEED }} | |
--store-password-in-clear-text | |
if: github.event_name != 'pull_request' | |
- name: Restore nuget packages | |
run: msbuild ${{env.caliburn_sln}} -t:restore | |
- name: Build app for release | |
run: msbuild ${{env.caliburn_sln}} /t:Build /p:Configuration=${{env.build_configuration}} | |
- name: Run Unit Tests | |
run: dotnet test ${{env.caliburn_sln}} --configuration Release --no-build --verbosity normal --collect:"XPlat Code Coverage" --results-directory ./coverage | |
- name: Restore nuget packages for tutorial | |
run: msbuild ${{env.caliburn_tutorial}} -t:restore | |
- name: Build feature tutorial | |
run: msbuild ${{env.caliburn_tutorial}} /t:Build /p:Configuration=${{env.build_configuration}} | |
- name: Restore nuget packages for features | |
run: msbuild ${{env.caliburn_features}} -t:restore | |
- name: Build feature features | |
run: msbuild ${{env.caliburn_features}} /t:Build /p:Configuration=${{env.build_configuration}} | |
- name: Pack Nuget | |
run: msbuild ${{env.caliburn_sln}} /t:package /p:Configuration=${{env.build_configuration}} | |
- name: publish Nuget Packages to GitHub | |
run: dotnet nuget push packages\*.nupkg --source ${{env.package_feed}} --api-key ${{secrets.PUBLISH_NUGET_PACKAGE}} --skip-duplicate | |
if: github.event_name != 'pull_request' | |