@@ -45,13 +45,13 @@ jobs:
4545 $manifest.Save($manifestPath)
4646 - name : Login to Azure
4747 uses : azure/login@v3
48- if : ${{ github.event_name == 'workflow_call' && inputs.release == 'true' }}
48+ if : ${{ inputs.release }}
4949 with :
5050 client-id : ${{ secrets.TS_CLIENT_ID }}
5151 tenant-id : ${{ secrets.TS_TENANT_ID }}
5252 subscription-id : ${{ secrets.TS_SUBSCRIPTION_ID }}
5353 - name : Create Trusted Signing configuration
54- if : ${{ github.event_name == 'workflow_call' && inputs.release }}
54+ if : ${{ inputs.release }}
5555 run : |
5656 $config = @{
5757 Endpoint = "${{ secrets.TS_ENDPOINT }}"
6161 $json = $config | ConvertTo-Json
6262 $json | Out-File -FilePath "${{ github.workspace }}\trusted-signing.json"
6363 - name : Set App Center connection string
64- if : ${{ github.event_name == 'workflow_call' && inputs.release }}
64+ if : ${{ inputs.release }}
6565 run : |
6666 $xmlPath = "${{ github.workspace}}\MicaForEveryone.App\appsettings.resw"
6767 [xml]$xml = Get-Content -Path $xmlPath
@@ -72,15 +72,44 @@ jobs:
7272 - name : Restore
7373 run : dotnet restore
7474 - name : Build
75- run : dotnet build MicaForEveryone.App\MicaForEveryone.App.csproj /p:Platform=x64 -c Release /p:GenerateAppxPackageOnBuild=true /p:UapAppxPackageBuildMode=${{ matrix.channel == 'Store' && 'CI' || 'SideloadOnly' }} /p:TrustedSigningEnabled=${{ (github.event_name == 'workflow_call' && inputs.release) && 'true' || 'false' }} /p:TrustedSigningMetadataPath="${{ github.workspace }}\trusted-signing.json" --no-restore
75+ run : dotnet build MicaForEveryone.App\MicaForEveryone.App.csproj /p:Platform=x64 -c Release /p:GenerateAppxPackageOnBuild=true /p:UapAppxPackageBuildMode=${{ matrix.channel == 'Store' && 'CI' || 'SideloadOnly' }} /p:TrustedSigningEnabled=${{ inputs.release && 'true' || 'false' }} /p:TrustedSigningMetadataPath="${{ github.workspace }}\trusted-signing.json" --no-restore
7676 - name : Copy artifacts
7777 run : |
7878 $isStore = "${{ matrix.channel }}" -eq "Store"
7979 $extensions = if ($isStore) { (".msixupload") } else { (".msixbundle", ".appxsym") }
8080 $outputDir = "${{ github.workspace }}\output"
81+ $appPackagesDir = Get-ChildItem -Path . -Directory -Recurse |
82+ Where-Object { $_.Name -eq "AppPackages" } |
83+ Select-Object -First 1
84+
8185 New-Item -ItemType Directory -Path $outputDir -Force | Out-Null
82- Get-ChildItem -Path . -Recurse | Where-Object { $_.FullName -match '\\AppPackages\\' -and $_.Extension -in $extensions -and $_.FullName -notmatch '\\Dependencies\\' } | ForEach-Object {
83- Copy-Item -Path $_.FullName -Destination $outputDir
86+
87+ Get-ChildItem -Path $appPackagesDir -File -Recurse |
88+ Where-Object { $_.Extension -in $extensions -and $_.FullName -notmatch '\\Dependencies\\' } |
89+ ForEach-Object {
90+ Copy-Item -Path $_ -Destination $outputDir
91+ }
92+
93+ if (-not $isStore) {
94+ $dependenciesDir = Get-ChildItem -Path $appPackagesDir -Directory -Recurse |
95+ Where-Object { $_.Name -eq "Dependencies" } |
96+ Select-Object -First 1
97+
98+ $dependencyOutputDir = Join-Path $outputDir "Dependencies"
99+ New-Item -ItemType Directory -Path $dependencyOutputDir -Force | Out-Null
100+
101+ foreach ($arch in @("arm64", "x64", "x86")) {
102+ $archDirectories = Get-ChildItem -Path $dependenciesDir -Directory -Recurse |
103+ Where-Object { $_.Name -ieq $arch }
104+
105+ foreach ($archDirectory in $archDirectories) {
106+ Get-ChildItem -Path $archDirectory -File -Filter "*.msix" | ForEach-Object {
107+ $destinationName = "{0}.{1}{2}" -f $_.BaseName, $arch, $_.Extension
108+ $destinationPath = Join-Path $dependencyOutputDir $destinationName
109+ Copy-Item -Path $_ -Destination $destinationPath -Force
110+ }
111+ }
112+ }
84113 }
85114 - name : Upload artifact
86115 uses : actions/upload-artifact@v7
0 commit comments