Skip to content

Commit 2f55cfa

Browse files
Merge branch 'microsoft:main' into client-assertion
2 parents 771ea0e + 1bbca96 commit 2f55cfa

34 files changed

Lines changed: 403 additions & 439 deletions

.github/dependabot.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,5 @@ updates:
55
schedule:
66
# Check for updates to GitHub Actions every week
77
interval: "weekly"
8+
cooldown:
9+
default-days: 7

.github/workflows/build.yml

Lines changed: 31 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ on:
1010
branches: [ "main" ]
1111

1212
jobs:
13-
build-nuget-and-tests:
14-
name: Build Nuget and Run Tests
13+
build-and-test:
14+
name: Build and Run Tests
1515
strategy:
1616
fail-fast: false
1717
matrix:
@@ -20,13 +20,13 @@ jobs:
2020
permissions:
2121
checks: write
2222
steps:
23-
- uses: actions/checkout@v4
23+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
2424
with:
2525
fetch-depth: 0
2626
- name: Setup .NET
27-
uses: actions/setup-dotnet@v4
27+
uses: actions/setup-dotnet@a98b56852c35b8e3190ac28c8c2271da59106c68 # v6.0.0
2828
with:
29-
dotnet-version: 9.0.x
29+
dotnet-version: 10.0.x
3030
- name: Install and Configure Keyring
3131
if: ${{ matrix.os == 'ubuntu-latest' }}
3232
run: |
@@ -43,36 +43,27 @@ jobs:
4343
run: dotnet restore MSStore.CLI.sln /p:Configuration=Release
4444
- name: Build
4545
run: dotnet build MSStore.CLI.sln --no-restore /p:Configuration=Release
46-
- name: Test net9.0
47-
run: dotnet run --project MSStore.CLI.UnitTests -f net9.0 --no-build -c Release --coverage --coverage-output-format cobertura --report-trx --results-directory ./TestResults
48-
- name: Test net9.0-windows10.0.17763.0
46+
- name: Test net10.0
47+
run: dotnet run --project MSStore.CLI.UnitTests -f net10.0 --no-build -c Release --coverage --coverage-output-format cobertura --report-trx --results-directory ./TestResults
48+
- name: Test net10.0-windows10.0.17763.0
4949
if: ${{ matrix.os == 'windows-latest' }}
50-
run: dotnet run --project MSStore.CLI.UnitTests -f net9.0-windows10.0.17763.0 --no-build -c Release --coverage --coverage-output-format cobertura --report-trx --results-directory ./TestResults
50+
run: dotnet run --project MSStore.CLI.UnitTests -f net10.0-windows10.0.17763.0 --no-build -c Release --coverage --coverage-output-format cobertura --report-trx --results-directory ./TestResults
5151
- name: Publish test results
5252
if: ${{ !cancelled() }}
53-
uses: actions/upload-artifact@v4
53+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
5454
with:
5555
name: test-results-${{ matrix.os }}
5656
path: TestResults/*.trx
5757
- name: Install ReportGenerator
58-
run: dotnet tool install --global dotnet-reportgenerator-globaltool --version 5.4.11
58+
run: dotnet tool install --global dotnet-reportgenerator-globaltool --version 5.5.1
5959
- name: Merge code coverage files
6060
run: reportgenerator "-reports:${{ github.workspace }}/**/*.cobertura.xml" "-targetdir:${{ github.workspace }}/report" "-reporttypes:Cobertura" "-filefilters:-*GenerationContext*.g.cs"
6161
- name: Publish code coverage results
62-
uses: actions/upload-artifact@v4
62+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
6363
with:
6464
name: Cobertura-${{ matrix.os }}
6565
path: ${{ github.workspace }}/report/Cobertura.xml
6666
# TODO: Publish github comment with code coverage
67-
- name: Pack NuGet
68-
if: ${{ matrix.os == 'ubuntu-latest' }}
69-
run: dotnet pack MSStore.API --no-build -c Release
70-
- name: Upload Artifact - NuGet
71-
if: ${{ matrix.os == 'ubuntu-latest' }}
72-
uses: actions/upload-artifact@v4
73-
with:
74-
name: NuGet
75-
path: MSStore.API/bin/Release/*.nupkg
7667

7768
build-cli:
7869
strategy:
@@ -84,38 +75,43 @@ jobs:
8475
include:
8576
- os: windows-latest
8677
dotnet-os: win
87-
dotnet-framework: net9.0-windows10.0.17763.0
78+
dotnet-framework: net10.0-windows10.0.17763.0
8879
- os: ubuntu-latest
8980
dotnet-os: linux
90-
dotnet-framework: net9.0
81+
dotnet-framework: net10.0
9182
- os: macos-latest
9283
dotnet-os: osx
93-
dotnet-framework: net9.0
84+
dotnet-framework: net10.0
9485
runs-on: ${{ matrix.os }}
9586

9687
name: Build CLI - ${{ matrix.dotnet-os }}-${{ matrix.dotnet-arch }}
9788

9889
steps:
99-
- uses: actions/checkout@v4
90+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
10091
with:
10192
fetch-depth: 0
10293
- name: Setup .NET
103-
uses: actions/setup-dotnet@v4
94+
uses: actions/setup-dotnet@a98b56852c35b8e3190ac28c8c2271da59106c68 # v6.0.0
10495
with:
105-
dotnet-version: 9.0.x
96+
dotnet-version: 10.0.x
10697
- name: Add msbuild to PATH
10798
if: ${{ matrix.os == 'windows-latest' }}
108-
uses: microsoft/setup-msbuild@v2
99+
uses: microsoft/setup-msbuild@30375c66a4eea26614e0d39710365f22f8b0af57 # v3.0.0
109100
- name: Install NBGV tool
110101
run: dotnet tool install --tool-path . nbgv
111102
- name: Set Version
112103
run: ./nbgv cloud
113-
- name: Restore CLI
114-
run: dotnet restore MSStore.CLI -r ${{ matrix.dotnet-os }}-${{ matrix.dotnet-arch }} /p:Configuration=Release /p:PublishReadyToRun=true
115-
- name: Build CLI
116-
run: dotnet build MSStore.CLI --no-restore --no-self-contained -r ${{ matrix.dotnet-os }}-${{ matrix.dotnet-arch }} -f ${{ matrix.dotnet-framework }} /p:Configuration=Release
104+
- name: Install linux-arm64 NativeAOT toolchain
105+
if: ${{ matrix.os == 'ubuntu-latest' && matrix.dotnet-arch == 'arm64' }}
106+
run: |
107+
sudo apt-get update
108+
sudo apt-get install -y \
109+
clang llvm lld \
110+
binutils-aarch64-linux-gnu \
111+
gcc-aarch64-linux-gnu g++-aarch64-linux-gnu \
112+
libc6-dev-arm64-cross
117113
- name: Publish SelfContained CLI
118-
run: dotnet publish MSStore.CLI --no-build --no-self-contained -r ${{ matrix.dotnet-os }}-${{ matrix.dotnet-arch }} -f ${{ matrix.dotnet-framework }} /p:Configuration=Release /p:PublishProfile=${{ matrix.dotnet-os }}-${{ matrix.dotnet-arch }}
114+
run: dotnet publish MSStore.CLI --self-contained -r ${{ matrix.dotnet-os }}-${{ matrix.dotnet-arch }} -f ${{ matrix.dotnet-framework }} /p:Configuration=Release /p:PublishProfile=${{ matrix.dotnet-os }}-${{ matrix.dotnet-arch }}
119115
- run: |
120116
New-Item -ItemType File -Path ".\MSStore.CLI.MSIX\obj\${{ matrix.dotnet-arch }}\appxmanifest.xml" -Force
121117
Copy-Item ".\MSStore.CLI.MSIX\Package.appxmanifest" -Destination ".\MSStore.CLI.MSIX\obj\${{ matrix.dotnet-arch }}\appxmanifest.xml" -Force
@@ -135,13 +131,13 @@ jobs:
135131
run: ."C:\Program Files (x86)\Windows Kits\10\App Certification Kit\SignTool.exe" sign /fd SHA256 /a /f .\MSStore.CLI.MSIX\MSStore.CLI.MSIX_TemporaryKey.pfx ${{ github.workspace }}/MSStore.CLI.MSIX/AppPackages/${{ matrix.dotnet-arch }}/MSStore.CLI.MSIX_${{ env.GitBuildVersionSimple }}.0_${{ matrix.dotnet-arch }}_Test.msix
136132
- name: Upload Artifact - CLI
137133
if: ${{ !env.ACT }}
138-
uses: actions/upload-artifact@v4
134+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
139135
with:
140136
name: CLI-${{ matrix.dotnet-os }}-${{ matrix.dotnet-arch }}
141137
path: ${{ github.workspace }}/MSStore.CLI/bin/Release/${{ matrix.dotnet-framework }}/${{ matrix.dotnet-os }}-${{ matrix.dotnet-arch }}/publish/**/*
142138
- name: Upload Artifact - MSIX
143139
if: ${{ matrix.os == 'windows-latest' && !env.ACT }}
144-
uses: actions/upload-artifact@v4
140+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
145141
with:
146142
name: CLI-MSIX-${{ matrix.dotnet-arch }}
147143
path: ${{ github.workspace }}/MSStore.CLI.MSIX/AppPackages/${{ matrix.dotnet-arch }}/MSStore.CLI.MSIX_${{ env.GitBuildVersionSimple }}.0_${{ matrix.dotnet-arch }}_Test.msix

.github/workflows/test-report.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
runs-on: ${{ matrix.os }}
1818
steps:
1919
- name: Display test results
20-
uses: dorny/test-reporter@v1
20+
uses: dorny/test-reporter@a43b3a5f7366b97d083190328d2c652e1a8b6aa2 # v3.0.0
2121
with:
2222
artifact: test-results-${{ matrix.os }}
2323
name: Test - Results - ${{ matrix.os }}

.pipelines/build.yml

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,6 @@ parameters:
1616
type: object
1717
default:
1818
- Release
19-
- name: buildPlatforms
20-
type: object
21-
default:
22-
- x64
23-
- arm64
2419
- name: pools
2520
type: object
2621
default:
@@ -49,7 +44,7 @@ extends:
4944
credscan:
5045
suppressionsFile: '$(System.DefaultWorkingDirectory)/.pipelines/CredScanSuppressions.json'
5146
binSkim:
52-
AnalyzeTargetGlob: '$(System.DefaultWorkingDirectory)\MSStore.API\bin\**\net9.0\MSStore.API.dll'
47+
AnalyzeTargetGlob: '$(System.DefaultWorkingDirectory)\MSStore.API\bin\**\net10.0\MSStore.API.dll'
5348
stages:
5449
- stage: Build_And_Run_CodeQL
5550
jobs:
@@ -63,17 +58,15 @@ extends:
6358
steps:
6459
- checkout: self
6560
- task: UseDotNet@2
66-
displayName: Setup .NET 9
61+
displayName: Setup .NET 10
6762
inputs:
68-
version: 9.0.x
63+
version: 10.0.x
6964
- script: mv -f $(Build.SourcesDirectory)/.pipelines/release-nuget.config ./nuget.config
7065
displayName: Add release package source
7166
- task: NuGetAuthenticate@1
7267
- script: dotnet restore MSStore.CLI.sln /p:Configuration=${{ dotnet_config }}
7368
displayName: Restore dependencies
74-
- template: ./.pipelines/templates/build-nuget.yaml@self
69+
- template: ./.pipelines/templates/build-and-tests.yaml@self
7570
parameters:
7671
dotnet_configuration: ${{ dotnet_config }}
77-
AgentOS: $(Agent.OS)
78-
DoEsrp: false
79-
signingIdentity: {}
72+
AgentOS: $(Agent.OS)

.pipelines/code-inspector.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ extends:
3535
credscan:
3636
suppressionsFile: '$(System.DefaultWorkingDirectory)/.pipelines/CredScanSuppressions.json'
3737
binSkim:
38-
AnalyzeTargetGlob: '$(System.DefaultWorkingDirectory)\MSStore.API\bin\**\net9.0\MSStore.API.dll'
38+
AnalyzeTargetGlob: '$(System.DefaultWorkingDirectory)\MSStore.API\bin\**\net10.0\MSStore.API.dll'
3939
stages:
4040
- stage: codeInspector
4141
displayName: Code Inspector

.pipelines/publish_release.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -173,9 +173,6 @@ extends:
173173
- stage: HomeBrew
174174
displayName: MacOS HomeBrew Deployment
175175
dependsOn: GitHub_Release_And_MSStore
176-
variables:
177-
- name: GitHubPAT
178-
value: $(GitHubPAT)
179176
jobs:
180177
- job: PreDeploymentApprovalJob
181178
displayName: Pre-Deployment Approval
@@ -195,8 +192,10 @@ extends:
195192
steps:
196193
- task: CmdLine@2
197194
displayName: Checkout HomeBrew Repo
195+
env:
196+
GITHUB_PAT: $(GitHubPAT)
198197
inputs:
199-
script: git clone https://oauth2:$(GitHubPAT)@github.com/microsoft/homebrew-msstore-cli.git $(Pipeline.Workspace)\homebrew-msstore-cli
198+
script: git clone https://oauth2:%GITHUB_PAT%@github.com/microsoft/homebrew-msstore-cli.git $(Pipeline.Workspace)\homebrew-msstore-cli
200199
- task: DownloadGitHubRelease@0
201200
displayName: Download GitHub Release
202201
inputs:

.pipelines/release.yml

Lines changed: 14 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -40,17 +40,17 @@ parameters:
4040
image: windows-latest
4141
os: windows
4242
dotnet_runtime: win
43-
dotnet_framework: net9.0-windows10.0.17763.0
43+
dotnet_framework: net10.0-windows10.0.17763.0
4444
- name: Azure-Pipelines-1ESPT-ExDShared
4545
image: ubuntu-latest
4646
os: linux
4747
dotnet_runtime: linux
48-
dotnet_framework: net9.0
48+
dotnet_framework: net10.0
4949
- name: Azure Pipelines
5050
image: macos-latest
5151
os: macOS
5252
dotnet_runtime: osx
53-
dotnet_framework: net9.0
53+
dotnet_framework: net10.0
5454

5555
name: 0.0.$(Date:yyMM).$(Date:dd)$(Rev:rr)
5656

@@ -69,51 +69,36 @@ extends:
6969
credscan:
7070
suppressionsFile: '$(System.DefaultWorkingDirectory)/.pipelines/CredScanSuppressions.json'
7171
binSkim:
72-
AnalyzeTargetGlob: '$(System.DefaultWorkingDirectory)\MSStore.API\bin\**\net9.0\MSStore.API.dll'
72+
AnalyzeTargetGlob: '$(System.DefaultWorkingDirectory)\MSStore.API\bin\**\net10.0\MSStore.API.dll'
7373
stages:
74-
- stage: NuGet
74+
- stage: Build_And_Tests
7575
jobs:
7676
- ${{ each pool in parameters.pools }}:
7777
- ${{ each dotnet_config in parameters.dotnet_configurations }}:
78-
- job: Build_Nuget_And_Tests_${{ pool.os }}_${{ dotnet_config }}
79-
displayName: Build Nuget and Run Tests (${{ pool.os }}_${{ dotnet_config }})
78+
- job: Build_And_Tests_${{ pool.os }}_${{ dotnet_config }}
79+
displayName: Build and Run Tests (${{ pool.os }}_${{ dotnet_config }})
8080
pool:
8181
name: ${{ pool.name }}
8282
image: ${{ pool.image }}
8383
os: ${{ pool.os }}
8484
steps:
8585
- checkout: self
8686
- task: UseDotNet@2
87-
displayName: Setup .NET 9
87+
displayName: Setup .NET 10
8888
inputs:
89-
version: 9.0.x
90-
- ${{ if eq(parameters.DoEsrp, 'true') }}:
91-
- task: UseDotNet@2
92-
displayName: Setup .NET 6.0 (For ESRP Task)
93-
condition: startsWith(variables['Agent.OS'], 'Linux')
94-
inputs:
95-
packageType: runtime
96-
version: 6.0.x
89+
version: 10.0.x
9790
- script: mv -f $(Build.SourcesDirectory)/.pipelines/release-nuget.config ./nuget.config
9891
displayName: Add release package source
9992
- task: NuGetAuthenticate@1
10093
- script: dotnet restore MSStore.CLI.sln /p:Configuration=${{ dotnet_config }}
10194
displayName: Restore dependencies
102-
- template: ./.pipelines/templates/build-nuget.yaml@self
103-
parameters:
104-
dotnet_configuration: ${{ dotnet_config }}
105-
AgentOS: $(Agent.OS)
106-
DoEsrp: ${{ parameters.DoEsrp }}
107-
signingIdentity: ${{ parameters.signingIdentity }}
108-
- template: ./.pipelines/templates/pack-nuget.yaml@self
95+
- template: ./.pipelines/templates/build-and-tests.yaml@self
10996
parameters:
11097
dotnet_configuration: ${{ dotnet_config }}
11198
AgentOS: $(Agent.OS)
112-
DoEsrp: ${{ parameters.DoEsrp }}
113-
signingIdentity: ${{ parameters.signingIdentity }}
11499

115100
- stage: CLI
116-
dependsOn: NuGet
101+
dependsOn: Build_And_Tests
117102
jobs:
118103
- ${{ each pool in parameters.pools }}:
119104
- ${{ each dotnet_config in parameters.dotnet_configurations }}:
@@ -128,9 +113,9 @@ extends:
128113
- checkout: self
129114
persistCredentials: true
130115
- task: UseDotNet@2
131-
displayName: Setup .NET 9
116+
displayName: Setup .NET 10
132117
inputs:
133-
version: 9.0.x
118+
version: 10.0.x
134119
- ${{ if eq(parameters.DoEsrp, 'true') }}:
135120
- task: UseDotNet@2
136121
displayName: Setup .NET 6.0 (For ESRP Task)
@@ -150,7 +135,7 @@ extends:
150135
xmlTargetFiles: ''
151136
xmlTransformationRules: ''
152137
- task: NuGetAuthenticate@1
153-
- script: dotnet restore MSStore.CLI -r ${{ pool.dotnet_runtime }}-${{ platform }} /p:Configuration=${{ dotnet_config }} /p:PublishReadyToRun=true
138+
- script: dotnet restore MSStore.CLI -r ${{ pool.dotnet_runtime }}-${{ platform }} /p:Configuration=${{ dotnet_config }}
154139
displayName: Restore CLI
155140
- template: ./.pipelines/templates/build-cli.yaml@self
156141
parameters:

0 commit comments

Comments
 (0)