2021-08-17 23:20:03 +03:00
variables :
CurrentSemanticVersionBase : '1.0.0'
PreviewNumber : $[counter(variables['CurrentSemanticVersionBase'], 1001)]
CurrentSemanticVersion : '$(CurrentSemanticVersionBase)-preview$(PreviewNumber)'
NugetPackageVersion : '$(CurrentSemanticVersion)'
2023-01-21 16:15:28 +03:00
NugetPackageVersionMediaElement : '$(CurrentSemanticVersion)'
2023-05-31 16:35:38 +03:00
NugetPackageVersionMaps : '$(CurrentSemanticVersion)'
2023-03-07 00:30:25 +03:00
TOOLKIT_NET_VERSION : '7.0.200'
2022-11-09 12:50:54 +03:00
LATEST_NET_VERSION : '7.0.x'
2022-08-05 19:17:49 +03:00
PathToLibrarySolution : 'src/CommunityToolkit.Maui.sln'
PathToSamplesSolution : 'samples/CommunityToolkit.Maui.Sample.sln'
2021-08-17 23:20:03 +03:00
PathToCommunityToolkitCsproj : 'src/CommunityToolkit.Maui/CommunityToolkit.Maui.csproj'
2021-12-15 01:29:31 +03:00
PathToCommunityToolkitCoreCsproj : 'src/CommunityToolkit.Maui.Core/CommunityToolkit.Maui.Core.csproj'
2023-01-20 23:55:06 +03:00
PathToCommunityToolkitMediaElementCsproj : 'src/CommunityToolkit.Maui.MediaElement/CommunityToolkit.Maui.MediaElement.csproj'
2023-05-31 16:35:38 +03:00
PathToCommunityToolkitMapsCsproj : 'src/CommunityToolkit.Maui.Maps/CommunityToolkit.Maui.Maps.csproj'
2021-10-16 22:14:54 +03:00
PathToCommunityToolkitSampleCsproj : 'samples/CommunityToolkit.Maui.Sample/CommunityToolkit.Maui.Sample.csproj'
2021-08-17 23:20:03 +03:00
PathToCommunityToolkitUnitTestCsproj : 'src/CommunityToolkit.Maui.UnitTests/CommunityToolkit.Maui.UnitTests.csproj'
2022-07-15 01:05:26 +03:00
PathToCommunityToolkitAnalyzersCsproj : 'src/CommunityToolkit.Maui.Analyzers/CommunityToolkit.Maui.Analyzers.csproj'
2023-01-20 23:55:06 +03:00
PathToCommunityToolkitMediaElementAnalyzersCsproj : 'src/CommunityToolkit.Maui.MediaElement.Analyzers/CommunityToolkit.Maui.MediaElement.Analyzers.csproj'
2022-07-15 01:05:26 +03:00
PathToCommunityToolkitSourceGeneratorsCsproj : 'src/CommunityToolkit.Maui.SourceGenerators/CommunityToolkit.Maui.SourceGenerators.csproj'
PathToCommunityToolkitAnalyzersCodeFixCsproj : 'src/CommunityToolkit.Maui.Analyzers.CodeFixes/CommunityToolkit.Maui.Analyzers.CodeFixes.csproj'
2023-01-20 23:55:06 +03:00
PathToCommunityToolkitMediaElementAnalyzersCodeFixCsproj : 'src/CommunityToolkit.Maui.MediaElement.Analyzers.CodeFixes/CommunityToolkit.Maui.MediaElement.Analyzers.CodeFixes.csproj'
2022-07-15 01:05:26 +03:00
PathToCommunityToolkitAnalyzersUnitTestCsproj : 'src/CommunityToolkit.Maui.Analyzers.UnitTests/CommunityToolkit.Maui.Analyzers.UnitTests.csproj'
2023-02-01 22:21:26 +03:00
DotNetMauiRollbackFile : 'https://maui.blob.core.windows.net/metadata/rollbacks/7.0.59.json'
2023-05-11 05:53:38 +03:00
CommunityToolkitSampleApp_Xcode_Version : '14.3.0'
2023-01-26 21:25:04 +03:00
CommunityToolkitLibrary_Xcode_Version : '14.0.1'
2021-08-05 00:46:18 +03:00
trigger :
2021-08-17 23:20:03 +03:00
branches :
include :
- main
- develop
tags :
include :
- '*'
paths :
exclude :
- README.md
2021-08-05 00:46:18 +03:00
2021-08-17 23:20:03 +03:00
pr :
2021-11-09 19:26:51 +03:00
autoCancel : 'true'
2021-08-17 23:20:03 +03:00
branches :
include :
- main
- develop
paths :
exclude :
- README.md
2021-08-05 00:46:18 +03:00
2022-10-20 23:04:38 +03:00
jobs :
- job : build_sample
displayName : Build Sample App using Latest .NET SDK
strategy :
matrix :
'Windows' :
image : 'windows-latest'
'macOS' :
2023-05-11 05:53:38 +03:00
image : 'macos-13'
2021-08-17 23:20:03 +03:00
pool :
2022-10-20 23:04:38 +03:00
vmImage : $(image)
2021-08-17 23:20:03 +03:00
steps :
2022-12-15 17:26:05 +03:00
- task : CmdLine@2
2023-01-26 21:25:04 +03:00
displayName : 'Set Xcode v$(CommunityToolkitSampleApp_Xcode_Version)'
2022-12-15 17:26:05 +03:00
condition : eq(variables['Agent.OS'], 'Darwin') # Only run this step on macOS
inputs :
2023-01-26 21:25:04 +03:00
script : echo '##vso[task.setvariable variable=MD_APPLE_SDK_ROOT;]'/Applications/Xcode_$(CommunityToolkitSampleApp_Xcode_Version).app;sudo xcode-select --switch /Applications/Xcode_$(CommunityToolkitSampleApp_Xcode_Version).app/Contents/Developer
2022-12-15 17:26:05 +03:00
2022-05-11 03:13:08 +03:00
- task : UseDotNet@2
2022-12-15 17:26:05 +03:00
displayName : 'Install Latest .NET SDK, v$(LATEST_NET_VERSION)'
2022-05-11 03:13:08 +03:00
inputs :
packageType : 'sdk'
2022-10-20 23:04:38 +03:00
version : '$(LATEST_NET_VERSION)'
2022-07-17 20:05:45 +03:00
2022-10-20 23:04:38 +03:00
- powershell : dotnet workload install maui
displayName : Install Latest .NET MAUI Workload
2022-07-17 20:05:45 +03:00
2022-11-09 02:17:54 +03:00
- pwsh : |
Invoke-WebRequest 'https://raw.githubusercontent.com/Samsung/Tizen.NET/main/workload/scripts/workload-install.ps1' -OutFile 'workload-install.ps1'
2022-11-09 12:50:54 +03:00
.\workload-install.ps1
2022-11-09 02:17:54 +03:00
displayName : Install Tizen Workload
2023-01-28 05:00:59 +03:00
- task : CmdLine@2
displayName : 'Build CommunityToolkit.Maui.Analyzers'
inputs :
script : 'dotnet build -c Release $(PathToCommunityToolkitAnalyzersCsproj)'
- task : CmdLine@2
displayName : 'Build CommunityToolkit.Maui.Analyzers.CodeFixes'
inputs :
script : 'dotnet build -c Release $(PathToCommunityToolkitAnalyzersCodeFixCsproj)'
- task : CmdLine@2
displayName : 'Build CommunityToolkit.Maui.MediaElement.Analyzers'
inputs :
script : 'dotnet build -c Release $(PathToCommunityToolkitMediaElementAnalyzersCsproj)'
- task : CmdLine@2
displayName : 'Build CommunityToolkit.Maui.MediaElement.Analyzers.CodeFixes'
inputs :
script : 'dotnet build -c Release $(PathToCommunityToolkitMediaElementAnalyzersCodeFixCsproj)'
- task : CmdLine@2
displayName : 'Build CommunityToolkit.Maui.SourceGenerators'
inputs :
script : 'dotnet build -c Release $(PathToCommunityToolkitSourceGeneratorsCsproj)'
2022-10-20 23:04:38 +03:00
# build sample
- task : CmdLine@2
displayName : 'Build Community Toolkit Sample'
inputs :
2022-12-15 17:26:05 +03:00
script : 'dotnet build $(PathToCommunityToolkitSampleCsproj) -c Release'
2022-10-20 23:04:38 +03:00
- job : build_library
displayName : Build Library
strategy :
matrix :
'Windows' :
image : 'windows-latest'
'macOS' :
image : 'macos-12'
pool :
vmImage : $(image)
steps :
2023-01-21 16:15:28 +03:00
# if this is a tagged build for CommunityToolkit.Maui, then update the version number
2021-08-17 23:20:03 +03:00
- powershell : |
$buildSourceBranch = "$(Build.SourceBranch)"
$tagVersion = $buildSourceBranch.Substring($buildSourceBranch.LastIndexOf("/") + 1)
Write-Host("Branch = $buildSourceBranch, Version = $tagVersion");
Write-Host ("##vso[task.setvariable variable=NugetPackageVersion;]$tagVersion")
displayName : Set NuGet Version to Tag Number
2023-01-21 16:15:28 +03:00
condition : and(startsWith(variables['Build.SourceBranch'], 'refs/tags/'), not(endsWith(variables['Build.SourceBranch'], '-mediaelement'))) # Only run this step when a Tag has triggered the CI Pipeline
# if this is a tagged build for CommunityToolkit.Maui.MediaElement, then update the version number
- powershell : |
$buildSourceBranch = "$(Build.SourceBranch)"
$tagVersion = $buildSourceBranch.Substring($buildSourceBranch.LastIndexOf("/") + 1)
2023-01-21 16:36:44 +03:00
$tagVersion = $tagVersion.Substring(0, $tagVersion.LastIndexOf("-"))
2023-01-21 16:15:28 +03:00
Write-Host("Branch = $buildSourceBranch, Version = $tagVersion");
Write-Host ("##vso[task.setvariable variable=NugetPackageVersionMediaElement;]$tagVersion")
displayName : Set NuGet Version to Tag Number
condition : and(startsWith(variables['Build.SourceBranch'], 'refs/tags/'), endsWith(variables['Build.SourceBranch'], '-mediaelement')) # Only run this step when a Tag has triggered the CI Pipeline
2022-07-17 20:05:45 +03:00
2023-05-31 16:35:38 +03:00
# if this is a tagged build for CommunityToolkit.Maui.Maps, then update the version number
- powershell : |
$buildSourceBranch = "$(Build.SourceBranch)"
$tagVersion = $buildSourceBranch.Substring($buildSourceBranch.LastIndexOf("/") + 1)
$tagVersion = $tagVersion.Substring(0, $tagVersion.LastIndexOf("-"))
Write-Host("Branch = $buildSourceBranch, Version = $tagVersion");
Write-Host ("##vso[task.setvariable variable=NugetPackageVersionMaps;]$tagVersion")
displayName : Set NuGet Version to Tag Number
condition : and(startsWith(variables['Build.SourceBranch'], 'refs/tags/'), endsWith(variables['Build.SourceBranch'], '-maps')) # Only run this step when a Tag has triggered the CI Pipeline
2021-09-09 10:13:52 +03:00
# if this is a PR build, then update the version number
- powershell : |
$prNumber = $env:System_PullRequest_PullRequestNumber
2021-10-08 14:00:34 +03:00
$commitId = "$($env:System_PullRequest_SourceCommitId)".Substring(0, 7)
SnackBar (#5)
* SnackBar/Toast
* Fix DisplaySnackBarAsync Task never completes if another SnackBar appears, and completes before SnackBar action
* Add samples
* Update src/CommunityToolkit.Maui/Views/Snackbar/Options/SnackBarActionOptions.shared.cs
Co-authored-by: Maksym Koshovyi <maximkoshevoi61@gmail.com>
* Apply suggestions from code review
Co-authored-by: Maksym Koshovyi <maximkoshevoi61@gmail.com>
* Base Toast and Snackbar
* Remove toast, update sample, remove ios
* Add border, padding, fix tests, call events
* remove base popup, fix anchor view
* rebase on main, ios, macos snackbar
* implement ITextStyle
* documentation
* set android action button font
* Fix font
* base tests
* Add tests, IPlatformPopupExtensions
* Remove unused tasks from pipeline
* Add Windows
* fix styles
* Add padding, fix ios font size
* Unsubscribe from events
* Minor code style tweaks
* Update azure-pipelines.yml
* Update CommunityToolkit.Maui.Sample.csproj
* `dotnet format`
* Implement `IDisposable` Per .NET Guidelines
https://docs.microsoft.com/en-us/dotnet/standard/garbage-collection/implementing-dispose
* `dotnet format`
* `SnackBar` -> `Snackbar`
* `SnackBar` -> `Snackbar`, Windows
* Update Snackbar Architecture
* `dotnet format`
* Refactor Snackbar Namespace to Alert`
* Update SnackBar.shared.cs
* Fix CR comments
Update class names, fix padding on apple, attempt to fix winui
* Fix behavior on Windows and ios
* Add tests
Co-authored-by: Maksym Koshovyi <maximkoshevoi61@gmail.com>
Co-authored-by: Brandon Minnick <13558917+brminnick@users.noreply.github.com>
2021-11-27 21:16:45 +03:00
$fullVersionString = "$(CurrentSemanticVersionBase)-build-$prNumber.$(Build.BuildId)+$commitId"
2021-09-09 10:13:52 +03:00
Write-Host("GitHub PR = $prNumber, Commit = $commitId");
Write-Host ("##vso[task.setvariable variable=NugetPackageVersion;]$fullVersionString")
2023-01-21 16:15:28 +03:00
Write-Host ("##vso[task.setvariable variable=NugetPackageVersionMediaElement;]$fullVersionString")
2021-09-09 10:13:52 +03:00
Write-Host "##vso[build.updatebuildnumber]$fullVersionString"
displayName : Set NuGet Version to PR Version
2022-12-15 17:26:05 +03:00
condition : and(succeeded(), eq(variables['Agent.OS'], 'Windows_NT'), eq(variables['build.reason'], 'PullRequest')) # Only run this step on Windows when a Pull Request has triggered the CI Pipeline
- task : CmdLine@2
2023-01-26 21:25:04 +03:00
displayName : 'Set Xcode v$(CommunityToolkitLibrary_Xcode_Version)'
2022-12-15 17:26:05 +03:00
condition : eq(variables['Agent.OS'], 'Darwin') # Only run this step on macOS
inputs :
2023-01-26 21:25:04 +03:00
script : echo '##vso[task.setvariable variable=MD_APPLE_SDK_ROOT;]'/Applications/Xcode_$(CommunityToolkitLibrary_Xcode_Version).app;sudo xcode-select --switch /Applications/Xcode_$(CommunityToolkitLibrary_Xcode_Version).app/Contents/Developer
2022-07-17 20:05:45 +03:00
2022-10-20 23:04:38 +03:00
- task : UseDotNet@2
2022-12-15 17:26:05 +03:00
displayName : Install .NET v$(TOOLKIT_NET_VERSION)
2022-10-20 23:04:38 +03:00
inputs :
packageType : 'sdk'
version : '$(TOOLKIT_NET_VERSION)'
- task : CmdLine@2
displayName : 'Install .NET MAUI Workload $(TOOLKIT_NET_VERSION)'
inputs :
2022-11-09 12:50:54 +03:00
script : dotnet workload install maui
2022-10-20 23:04:38 +03:00
2022-11-09 02:17:54 +03:00
- pwsh : |
Invoke-WebRequest 'https://raw.githubusercontent.com/Samsung/Tizen.NET/main/workload/scripts/workload-install.ps1' -OutFile 'workload-install.ps1'
2022-11-09 12:50:54 +03:00
.\workload-install.ps1
2022-11-09 02:17:54 +03:00
displayName : Install Tizen Workload
2022-10-20 23:04:38 +03:00
- task : CmdLine@2
2022-07-15 01:05:26 +03:00
displayName : 'Build CommunityToolkit.Maui.Analyzers'
inputs :
2022-10-20 23:04:38 +03:00
script : 'dotnet build -c Release $(PathToCommunityToolkitAnalyzersCsproj)'
2022-07-17 20:05:45 +03:00
2022-10-20 23:04:38 +03:00
- task : CmdLine@2
2022-07-15 01:05:26 +03:00
displayName : 'Build CommunityToolkit.Maui.Analyzers.CodeFixes'
inputs :
2022-10-20 23:04:38 +03:00
script : 'dotnet build -c Release $(PathToCommunityToolkitAnalyzersCodeFixCsproj)'
2022-07-17 20:05:45 +03:00
2023-01-20 23:55:06 +03:00
- task : CmdLine@2
displayName : 'Build CommunityToolkit.Maui.MediaElement.Analyzers'
inputs :
script : 'dotnet build -c Release $(PathToCommunityToolkitMediaElementAnalyzersCsproj)'
- task : CmdLine@2
displayName : 'Build CommunityToolkit.Maui.MediaElement.Analyzers.CodeFixes'
inputs :
script : 'dotnet build -c Release $(PathToCommunityToolkitMediaElementAnalyzersCodeFixCsproj)'
2022-10-20 23:04:38 +03:00
- task : CmdLine@2
2022-07-15 01:05:26 +03:00
displayName : 'Build CommunityToolkit.Maui.SourceGenerators'
inputs :
2022-10-20 23:04:38 +03:00
script : 'dotnet build -c Release $(PathToCommunityToolkitSourceGeneratorsCsproj)'
2022-07-17 20:05:45 +03:00
2022-10-20 23:04:38 +03:00
- task : CmdLine@2
displayName : 'Run CommunityToolkit.Maui.Analyzers.UnitTests'
2022-02-16 16:18:29 +03:00
inputs :
2022-10-20 23:04:38 +03:00
script : 'dotnet test $(PathToCommunityToolkitAnalyzersUnitTestCsproj) -c Release'
2022-07-17 20:05:45 +03:00
2022-10-20 23:04:38 +03:00
- task : CmdLine@2
displayName : 'Run CommunityToolkit.Maui.UnitTests'
2022-07-15 01:05:26 +03:00
inputs :
2022-10-20 23:04:38 +03:00
script : 'dotnet test $(PathToCommunityToolkitUnitTestCsproj) -c Release --settings ".runsettings" --collect "XPlat code coverage" --logger trx --results-directory $(Agent.TempDirectory)'
2022-07-17 20:05:45 +03:00
2022-04-02 19:26:14 +03:00
- task : PublishTestResults@2
2022-12-15 17:26:05 +03:00
condition : eq(variables['Agent.OS'], 'Windows_NT') # Only run this step on Windows
2022-04-02 19:26:14 +03:00
displayName : 'Publish Test Results'
2022-02-16 01:08:50 +03:00
inputs :
2022-04-02 19:26:14 +03:00
testResultsFormat : VSTest
testResultsFiles : '**/*.trx'
searchFolder : $(Agent.TempDirectory)
2022-07-17 20:05:45 +03:00
2022-04-02 19:26:14 +03:00
- task : PublishCodeCoverageResults@1
2022-12-15 17:26:05 +03:00
condition : eq(variables['Agent.OS'], 'Windows_NT') # Only run this step on Windows
2022-04-02 19:26:14 +03:00
displayName : 'Publish Code Coverage Results'
inputs :
codeCoverageTool : 'Cobertura'
summaryFileLocation : '$(Agent.TempDirectory)/**/coverage.cobertura.xml'
failIfCoverageEmpty : true
2022-07-17 20:05:45 +03:00
2022-10-20 23:04:38 +03:00
- task : CmdLine@2
displayName : 'Pack CommunityToolkit.Maui.Core NuGet'
2021-08-17 23:20:03 +03:00
inputs :
2022-10-20 23:04:38 +03:00
script : 'dotnet pack $(PathToCommunityToolkitCoreCsproj) -c Release -p:PackageVersion=$(NugetPackageVersion)'
- task : CmdLine@2
displayName : 'Pack CommunityToolkit.Maui NuGet'
2022-01-07 01:34:21 +03:00
inputs :
2022-10-20 23:04:38 +03:00
script : 'dotnet pack $(PathToCommunityToolkitCsproj) -c Release -p:PackageVersion=$(NugetPackageVersion)'
2023-01-20 23:55:06 +03:00
- task : CmdLine@2
displayName : 'Pack CommunityToolkit.Maui.MediaElement NuGet'
inputs :
2023-01-21 16:15:28 +03:00
script : 'dotnet pack $(PathToCommunityToolkitMediaElementCsproj) -c Release -p:PackageVersion=$(NugetPackageVersionMediaElement)'
2022-10-20 23:04:38 +03:00
2023-05-31 16:35:38 +03:00
- task : CmdLine@2
displayName : 'Pack CommunityToolkit.Maui.Maps NuGet'
inputs :
script : 'dotnet pack $(PathToCommunityToolkitMapsCsproj) -c Release -p:PackageVersion=$(NugetPackageVersionMaps)'
2022-04-02 19:26:14 +03:00
# check vulnerabilities
2022-07-17 20:05:45 +03:00
- powershell : |
2022-08-05 19:17:49 +03:00
dotnet list $(PathToLibrarySolution) package --vulnerable --include-transitive | findstr /S /c:"has the following vulnerable packages";
2022-07-17 20:05:45 +03:00
if ($LastExitCode -ne 1)
{
2022-10-20 23:04:38 +03:00
dotnet list $(PathToLibrarySolution) package --vulnerable --include-transitive;
2022-07-17 20:05:45 +03:00
exit 1;
}
exit 0;
2022-04-02 19:26:14 +03:00
displayName : 'Check Dependencies'
2022-12-15 17:26:05 +03:00
condition : eq(variables['Agent.OS'], 'Windows_NT') # Only run this step on Windows
2022-07-17 20:05:45 +03:00
2023-01-21 22:16:54 +03:00
# Copy all NuGet packages
2022-02-08 06:06:12 +03:00
- task : PowerShell@2
2023-01-21 22:16:54 +03:00
condition : and(eq(variables['Agent.OS'], 'Windows_NT'), not(startsWith(variables['Build.SourceBranch'], 'refs/tags/'))) # Only run this step on Windows and when it's not a tagged build
2022-02-08 06:06:12 +03:00
displayName : 'Copy NuGet Packages to Staging Directory'
inputs :
targetType : 'inline'
script : |
$source = ".\src"
$filter = "nupkg"
Get-ChildItem -Path $source -Recurse | Where-Object { $_.Extension -match $filter } | Copy-Item -Destination "$(Build.ArtifactStagingDirectory)"
pwsh : true
2023-01-21 22:16:54 +03:00
# Copy CommunityToolkit.Maui & CommunityToolkit.Maui.Core packages
- task : PowerShell@2
2023-06-13 21:30:56 +03:00
condition : and(eq(variables['Agent.OS'], 'Windows_NT'),
startsWith(variables['Build.SourceBranch'], 'refs/tags/'),
not(endsWith(variables['Build.SourceBranch'], '-mediaelement')),
not(endsWith(variables['Build.SourceBranch'], '-maps'))) # Only run this step on Windows and when it's a tagged build and the tag does NOT end with -mediaelement and does NOT end with -maps
2023-01-21 22:16:54 +03:00
displayName : 'Copy CommunityToolkit.Maui & CommunityToolkit.Maui.Core NuGet Packages to Staging Directory'
inputs :
targetType : 'inline'
script : |
$source = ".\src"
$filter = "CommunityToolkit.Maui.(Core.)*[0-9]+.[0-9]+.[0-9]+(-[a-zA-Z0-9]*)*.nupkg"
Get-ChildItem -Path $source -Recurse | Where-Object { $_.Name -match $filter } | Copy-Item -Destination "$(Build.ArtifactStagingDirectory)"
pwsh : true
# Copy CommunityToolkit.Maui.MediaElement package
- task : PowerShell@2
condition : and(eq(variables['Agent.OS'], 'Windows_NT'), startsWith(variables['Build.SourceBranch'], 'refs/tags/'), endsWith(variables['Build.SourceBranch'], '-mediaelement')) # Only run this step on Windows and when it's a tagged build and the tag ends with -mediaelement
displayName : 'Copy CommunityToolkit.Maui.MediaElement NuGet Package to Staging Directory'
inputs :
targetType : 'inline'
script : |
$source = ".\src"
$filter = "CommunityToolkit.Maui.MediaElement.[0-9]+.[0-9]+.[0-9]+(-[a-zA-Z0-9]*)*.nupkg"
Get-ChildItem -Path $source -Recurse | Where-Object { $_.Name -match $filter } | Copy-Item -Destination "$(Build.ArtifactStagingDirectory)"
2023-05-31 16:35:38 +03:00
pwsh : true
# Copy CommunityToolkit.Maui.Maps package
- task : PowerShell@2
condition : and(eq(variables['Agent.OS'], 'Windows_NT'), startsWith(variables['Build.SourceBranch'], 'refs/tags/'), endsWith(variables['Build.SourceBranch'], '-maps')) # Only run this step on Windows and when it's a tagged build and the tag ends with -maps
displayName : 'Copy CommunityToolkit.Maui.Maps NuGet Package to Staging Directory'
inputs :
targetType : 'inline'
script : |
$source = ".\src"
$filter = "CommunityToolkit.Maui.Maps.[0-9]+.[0-9]+.[0-9]+(-[a-zA-Z0-9]*)*.nupkg"
Get-ChildItem -Path $source -Recurse | Where-Object { $_.Name -match $filter } | Copy-Item -Destination "$(Build.ArtifactStagingDirectory)"
2023-01-21 22:16:54 +03:00
pwsh : true
2022-07-17 20:05:45 +03:00
2021-08-20 11:15:52 +03:00
# Sign NuGet Packages
- task : PowerShell@2
displayName : Authenticode Sign Packages
inputs :
filePath : build/Sign-Package.ps1
env :
SignClientUser : $(SignClientUser)
SignClientSecret : $(SignClientSecret)
2022-02-08 06:06:12 +03:00
ArtifactDirectory : $(Build.ArtifactStagingDirectory)
2022-12-15 17:26:05 +03:00
condition : and(succeeded(), eq(variables['Agent.OS'], 'Windows_NT'), not(eq(variables['build.reason'], 'PullRequest')), not(eq(variables['SignClientSecret'], '')), not(eq(variables['SignClientUser'], ''))) # Only run this step on Windows when the CI Pipeline has not been triggered by a Pull Request and the NuGet Signing Certificate is valid
2022-07-17 20:05:45 +03:00
2023-01-21 22:16:54 +03:00
# Publish build artifacts
2021-08-17 23:20:03 +03:00
- task : PublishBuildArtifacts@1
2022-12-15 17:26:05 +03:00
condition : eq(variables['Agent.OS'], 'Windows_NT') # Only run this step on Windows
2021-08-20 11:15:52 +03:00
displayName : 'Publish NuGets'
2021-08-17 23:20:03 +03:00
inputs :
artifactName : nuget
2023-01-26 21:25:04 +03:00
pathToPublish : '$(Build.ArtifactStagingDirectory)'