diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 5f3694f..1d73659 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -11,31 +11,31 @@ jobs: runs-on: windows-latest steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 # avoid shallow clone so nbgv can do its work. - + - name: Setup .NET - uses: actions/setup-dotnet@v2 + uses: actions/setup-dotnet@v4 with: - dotnet-version: 6.0.x - + dotnet-version: 9.0.x + - name: Setup MSBuild.exe - uses: microsoft/setup-msbuild@v1.0.2 - + uses: microsoft/setup-msbuild@v2 + - name: Restore run: nuget restore src\BehaviorsSdk.sln - + - name: Build run: msbuild src\BehaviorsSdk.sln /p:Configuration=Release /p:SignType=real - + - name: Run Tests run: dotnet test Test\UnitTests\UnitTests.csproj - name: Pack Behaviors if: success() run: msbuild src\Microsoft.Xaml.Behaviors\Microsoft.Xaml.Behaviors.csproj /p:Configuration=Release -t:pack - + - name: Upload NuGet Artifacts if: success() uses: actions/upload-artifact@v4 diff --git a/Test/UnitTests/UnitTests.csproj b/Test/UnitTests/UnitTests.csproj index 2959f00..3b5af5d 100644 --- a/Test/UnitTests/UnitTests.csproj +++ b/Test/UnitTests/UnitTests.csproj @@ -1,6 +1,6 @@  - net462;net6.0-windows + net462;net9.0-windows false true Library diff --git a/azure-pipelines/build.yml b/azure-pipelines/build.yml index 2b63a5e..cbaf904 100644 --- a/azure-pipelines/build.yml +++ b/azure-pipelines/build.yml @@ -1,9 +1,19 @@ -# This Yaml Document has been converted by ESAI Yaml Pipeline Conversion Tool. +trigger: none +pr: none +schedules: +- cron: 0 3 * * 1,2,3,4,5 + branches: + include: + - refs/heads/main name: $(Date:yyyyMMdd).$(Rev:r) parameters: - name: OfficialRelease displayName: "Build and publish an official release" type: boolean + default: true +- name: PushNuGetPackages + displayName: "Push NuGet packages to NuGet.org" + type: boolean default: false variables: - name: BuildParameters.vsVersion @@ -23,14 +33,6 @@ variables: value: vscx-tools-authoring - name: TimestampPackage value: ${{ not (parameters.OfficialRelease) }} -trigger: - branches: - include: - - refs/heads/main -pr: - branches: - include: - - main resources: repositories: - repository: MicroBuildTemplate @@ -54,7 +56,7 @@ extends: jobs: - job: Build displayName: 'Build' - cancelTimeoutInMinutes: 1 + cancelTimeoutInMinutes: 30 pool: name: VSEngSS-MicroBuild2022-1ES templateContext: @@ -62,12 +64,23 @@ extends: signing: enabled: true signType: $(SignType) + ${{ if eq(variables['SignType'], 'real') }}: + signWithProd: true sbom: enabled: true outputs: + - output: pipelineArtifact + displayName: 'Publish Package Artifacts' + targetPath: $(Build.ArtifactStagingDirectory)\Packages + artifactName: Packages + - output: pipelineArtifact + displayName: 'Publish Logs' + targetPath: $(Build.ArtifactStagingDirectory)\Logs + artifactName: Logs + condition: always() - output: nuget displayName: 'NuGet push to NuGet.org' - condition: and(succeeded(), eq(variables['Build.OfficialRelease'], 'true')) + condition: and(succeeded(), eq(variables['Build.OfficialRelease'], 'true'), eq('${{ parameters.PushNuGetPackages }}', 'true')) packageParentPath: '$(Build.ArtifactStagingDirectory)\Packages' packagesToPush: $(Build.ArtifactStagingDirectory)\Packages\*.nupkg;!$(Build.ArtifactStagingDirectory)\Packages\*.symbols.nupkg nuGetFeedType: external @@ -87,7 +100,7 @@ extends: - task: UseDotNet@2 displayName: Use .NET Core SDK inputs: - version: 6.x + version: 9.0.x vsVersion: $(BuildParameters.vsVersion) performMultiLevelLookup: true - task: NuGetToolInstaller@1 @@ -101,7 +114,7 @@ extends: inputs: vsVersion: $(BuildParameters.vsVersion) solution: src\BehaviorsSdk.sln - msbuildArgs: /p:PublicRelease=$(Build.OfficialRelease) /p:SignType=$(SignType) /p:NoWarn=1591 /p:DebugType=full /v:diagnostic + msbuildArgs: /p:PublicRelease=$(Build.OfficialRelease) /p:SignType=$(SignType) /p:NoWarn=1591 /p:DebugType=full /bl:$(Build.ArtifactStagingDirectory)\Logs\behaviors_sdk_wpf.binlog configuration: Release maximumCpuCount: true - task: VSTest@2 @@ -122,7 +135,7 @@ extends: displayName: Build NuGet package inputs: solution: src\Microsoft.Xaml.Behaviors\Microsoft.Xaml.Behaviors.csproj - msbuildArgs: /t:Pack /p:PublicRelease=$(Build.OfficialRelease) /p:SignType=$(SignType) /p:TimestampPackage=$(TimestampPackage) /p:NoWarn=1591 /p:DebugType=full /v:diagnostic + msbuildArgs: /t:Pack /p:PublicRelease=$(Build.OfficialRelease) /p:SignType=$(SignType) /p:TimestampPackage=$(TimestampPackage) /p:NoWarn=1591 /p:DebugType=full configuration: Release - task: CopyFiles@2 displayName: 'Copy Symbols to: $(Pipeline.Workspace)\Symbols' @@ -130,14 +143,17 @@ extends: SourceFolder: src\Microsoft.Xaml.Behaviors\bin\ Contents: '**\*.pdb' TargetFolder: $(Pipeline.Workspace)\Symbols - - task: MicroBuildArchiveSymbols@5 + - task: MicroBuildArchiveSymbols@6 displayName: Archive Symbols condition: and(succeeded(), eq(variables['Build.OfficialRelease'], 'true')) inputs: + azureSubscription: VSEng-SymbolsUpload SymbolsFeatureName: XamlBehaviorsWpf SymbolsProject: VS SymbolsAgentPath: $(Pipeline.Workspace)\Symbols SubmitToInternet: false + env: + SYSTEM_ACCESSTOKEN: $(System.AccessToken) - task: CopyFiles@2 displayName: 'Copy NuGet Packages to: $(Build.ArtifactStagingDirectory)\Packages' inputs: diff --git a/es-metadata.yml b/es-metadata.yml index ec2fe72..db8d282 100644 --- a/es-metadata.yml +++ b/es-metadata.yml @@ -5,4 +5,4 @@ accountableOwners: routing: defaultAreaPath: org: devdiv - path: DevDiv\VS Core\IDE Experience\XAML IntelliSense + path: DevDiv\VS Core\XAML tools diff --git a/src/Microsoft.Xaml.Behaviors/Microsoft.Xaml.Behaviors.csproj b/src/Microsoft.Xaml.Behaviors/Microsoft.Xaml.Behaviors.csproj index f7f4c83..870403a 100644 --- a/src/Microsoft.Xaml.Behaviors/Microsoft.Xaml.Behaviors.csproj +++ b/src/Microsoft.Xaml.Behaviors/Microsoft.Xaml.Behaviors.csproj @@ -1,6 +1,6 @@ - net462;net6.0-windows + net462;net9.0-windows $(TargetsForTfmSpecificBuildOutput);IncludeProjectToProjectAssets Library Microsoft.Xaml.Behaviors.Wpf