-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Potential Fix for #262 - Remove UWP target from WinUI packages
Adds a 'all-uwp' target to UseTargetFrameworks.ps1 Adds better documentation to UseTargetFrameworks.ps1 Conditionally selects the set of platforms to build for in the CI based on if running the UWP or WinUI package job
- Loading branch information
1 parent
b2b9f85
commit a02f230
Showing
2 changed files
with
37 additions
and
6 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -51,6 +51,10 @@ jobs: | |
matrix: | ||
platform: [WinUI2, WinUI3] | ||
|
||
env: | ||
# faux-ternary expression to select which platforms to build for each platform vs. duplicating step below. | ||
TARGET_PLATFORMS: ${{ matrix.platform != 'WinUI' && 'all' || 'all-uwp' }} | ||
|
||
# Steps represent a sequence of tasks that will be executed as part of the job | ||
steps: | ||
- name: Install .NET 6 SDK | ||
|
@@ -72,9 +76,9 @@ jobs: | |
- name: Add msbuild to PATH | ||
uses: microsoft/[email protected] | ||
|
||
- name: Enable all TargetFrameworks | ||
- name: Enable ${{ env.TARGET_PLATFORMS }} TargetFrameworks | ||
working-directory: ./common/Scripts/ | ||
run: powershell -version 5.1 -command "./UseTargetFrameworks.ps1 all" -ErrorAction Stop | ||
run: powershell -version 5.1 -command "./UseTargetFrameworks.ps1 ${{ env.TARGET_PLATFORMS }}" -ErrorAction Stop | ||
|
||
- name: Generate solution | ||
run: powershell -version 5.1 -command "./GenerateAllSolution.ps1" -ErrorAction Stop | ||
|
@@ -94,11 +98,11 @@ jobs: | |
|
||
# Push Packages to our DevOps Artifacts Feed | ||
- name: Add source | ||
if: ${{github.ref == 'refs/heads/main'}} | ||
if: ${{ github.ref == 'refs/heads/main' }} | ||
run: dotnet nuget add source "https://pkgs.dev.azure.com/dotnet/CommunityToolkit/_packaging/CommunityToolkit-Labs/nuget/v3/index.json" --name LabsFeed --username dummy --password ${{ secrets.DEVOPS_PACKAGE_PUSH_TOKEN }} | ||
|
||
- name: Push packages | ||
if: ${{github.ref == 'refs/heads/main'}} | ||
if: ${{ github.ref == 'refs/heads/main' }} | ||
run: dotnet nuget push "**/*.nupkg" --api-key dummy --source LabsFeed --skip-duplicate | ||
|
||
# Run tests | ||
|
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