Include Demo3 app in release artifacts #2
Workflow file for this run
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 Artifacts | ||
| on: | ||
| workflow_call: | ||
| inputs: | ||
| build-configuration: | ||
| default: "Release" | ||
| required: false | ||
| type: string | ||
| mdix-version: | ||
| required: true | ||
| type: string | ||
| mdix-colors-version: | ||
| required: true | ||
| type: string | ||
| mdix-mahapps-version: | ||
| required: true | ||
| type: string | ||
| jobs: | ||
| build: | ||
| name: Build and Test | ||
| runs-on: windows-latest | ||
| env: | ||
| solution: MaterialDesignToolkit.Full.slnx | ||
| steps: | ||
| - uses: actions/checkout@v6 | ||
| - name: Setup .NET | ||
| uses: actions/setup-dotnet@v5 | ||
| with: | ||
| dotnet-version: | | ||
| 8.x | ||
| 9.x | ||
| 10.x | ||
| - name: Restore dependencies | ||
| run: dotnet restore ${{ env.solution }} | ||
| - name: Build | ||
| run: dotnet build ${{ env.solution }} --configuration ${{ inputs.build-configuration }} --no-restore -p:Platform="Any CPU" -p:TreatWarningsAsErrors=True | ||
| env: | ||
| MDIXVersion: ${{ inputs.mdix-version }} | ||
| MDIXColorsVersion: ${{ inputs.mdix-colors-version }} | ||
| MDIXMahAppsVersion: ${{ inputs.mdix-mahapps-version }} | ||
| - name: Test | ||
| timeout-minutes: 20 | ||
| run: dotnet test ${{ env.solution }} --configuration ${{ inputs.build-configuration }} --no-build --blame-crash --logger GitHubActions | ||
| - name: Upload Screenshots | ||
| if: ${{ always() }} | ||
| uses: actions/upload-artifact@v7 | ||
| with: | ||
| name: Screenshots-${{ github.run_number }} | ||
| path: ${{ github.workspace }}\tests\MaterialDesignThemes.UITests\bin\${{ inputs.build-configuration }}\net9.0-windows\Screenshots | ||
| if-no-files-found: ignore | ||
| - name: Build NuGets | ||
| run: .\build\BuildNugets.ps1 -MDIXVersion ${{ inputs.mdix-version }} -MDIXColorsVersion ${{ inputs.mdix-colors-version }} -MDIXMahAppsVersion ${{ inputs.mdix-mahapps-version }} | ||
| - name: Upload NuGets | ||
| uses: actions/upload-artifact@v7 | ||
| with: | ||
| name: NuGets | ||
| path: "*.nupkg" | ||
| - name: Upload Demo App | ||
| uses: actions/upload-artifact@v7 | ||
| with: | ||
| name: DemoApp | ||
| path: "src/MainDemo.Wpf/bin/${{ env.buildConfiguration }}" | ||
| - name: Upload Demo3 App | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: Demo3App | ||
| path: "src/MaterialDesign3.Demo.Wpf/bin/${{ env.buildConfiguration }}" | ||