Skip to content
This repository was archived by the owner on May 1, 2024. It is now read-only.

Commit 8b425fe

Browse files
authored
Microbuild sign (#12748)
* [Build] Sign with MicroBuild * [Build] Remove build-sign step * [Build] Use main again * [Build] Update SignList.xml
1 parent ab2325c commit 8b425fe

File tree

4 files changed

+53
-40
lines changed

4 files changed

+53
-40
lines changed

Diff for: azure-pipelines.yml

+9-10
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ resources:
2626
type: github
2727
name: xamarin/yaml-templates
2828
endpoint: xamarin
29-
ref: refs/heads/main # still defaults to master even though main is the main branch
29+
ref: refs/heads/main
3030

3131
trigger:
3232
branches:
@@ -310,14 +310,13 @@ stages:
310310
dependsOn: windows
311311
displayName: Sign Nuget
312312
jobs:
313-
- job: nuget_sign
314-
displayName: Sign Phase
315-
pool:
316-
name: $(signVmImage)
317-
demands:
318-
msbuild
319-
steps:
320-
- template: build/steps/build-sign.yml
321-
condition: and(succeeded(), ne(variables['signVmImage'], ''), or(eq(variables['Sign'], 'true'), or(eq(variables['Build.SourceBranch'], 'refs/heads/master'), startsWith(variables['Build.SourceBranch'],'refs/tags/'))))
313+
- template: sign-artifacts/jobs/v2.yml@xamarin-templates
314+
parameters:
315+
targetFolder: $(Build.ArtifactStagingDirectory)/nuget/signed
316+
artifactPath: release
317+
signedArtifactName: nuget
318+
signedArtifactPath: signed
319+
displayName: Sign Phase
320+
condition: and(succeeded(), ne(variables['signVmImage'], ''), or(eq(variables['Sign'], 'true'), or(eq(variables['Build.SourceBranch'], 'refs/heads/master'), startsWith(variables['Build.SourceBranch'],'refs/tags/'))))
322321

323322

Diff for: build/SignList.xml

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
2+
3+
<ItemGroup>
4+
<FirstParty Include="Xamarin.Forms.*.dll" />
5+
<FirstParty Include="FormsViewGroup.dll" />
6+
</ItemGroup>
7+
8+
<ItemGroup>
9+
<ThirdParty Include="GMap.NET.Core.dll" />
10+
<ThirdParty Include="GMap.NET.GTK.dll" />
11+
<ThirdParty Include="webkit-sharp.dll" />
12+
<ThirdParty Include="Mono.Cecil.dll" />
13+
<ThirdParty Include="Mono.Cecil.*.dll" />
14+
</ItemGroup>
15+
16+
<ItemGroup>
17+
<Skip Include="System.*.dll" />
18+
<Skip Include="NuGet.*.dll" />
19+
<Skip Include="Mono.*.dll" />
20+
</ItemGroup>
21+
22+
</Project>

Diff for: build/steps/build-nuget.yml

+22-2
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,12 @@ steps:
1515
SourceFolder: '$(Build.ArtifactsDirectory)/win_build'
1616
TargetFolder: '$(System.DefaultWorkingDirectory)'
1717

18+
- task: CopyFiles@2
19+
displayName: 'Copy SignList.xml Files'
20+
inputs:
21+
Contents: build/SignList.xml
22+
TargetFolder: '$(build.artifactstagingdirectory)/nuget'
23+
flattenFolders: true
1824

1925
- task: PowerShell@1
2026
displayName: 'Generate docs from docs repo'
@@ -38,6 +44,13 @@ steps:
3844
versioningScheme: byEnvVar
3945
versionEnvVar: nugetPackageVersion
4046
configuration: $(buildConfiguration)
47+
48+
- task: CopyFiles@2
49+
displayName: 'Copy SignList.xml Files'
50+
inputs:
51+
Contents: build/SignList.xml
52+
TargetFolder: '$(build.artifactstagingdirectory)/nuget/debug'
53+
flattenFolders: true
4154

4255

4356
- powershell: |
@@ -53,7 +66,7 @@ steps:
5366
}
5467
failOnStderr: true
5568
displayName: 'Update nuspecs'
56-
condition: and(succeeded(), or(eq(variables['DefaultBuildConfiguration'], 'Release'), eq(variables['Build.SourceBranch'], 'refs/heads/master'), startsWith(variables['Build.SourceBranch'],'refs/tags/')))
69+
condition: and(succeeded(), or(eq(variables['Sign'], 'true'), or(eq(variables['DefaultBuildConfiguration'], 'Release'), eq(variables['Build.SourceBranch'], 'refs/heads/master'), startsWith(variables['Build.SourceBranch'],'refs/tags/'))))
5770
5871
- task: NuGetCommand@2
5972
displayName: 'Make NuGet Package Release'
@@ -64,7 +77,14 @@ steps:
6477
packDestination: '$(Build.ArtifactStagingDirectory)/nuget/release'
6578
versioningScheme: byEnvVar
6679
versionEnvVar: nugetPackageVersion
67-
condition: and(succeeded(), or(eq(variables['DefaultBuildConfiguration'], 'Release'), eq(variables['Build.SourceBranch'], 'refs/heads/master'), startsWith(variables['Build.SourceBranch'],'refs/tags/')))
80+
condition: and(succeeded(), or(eq(variables['Sign'], 'true'), or(eq(variables['DefaultBuildConfiguration'], 'Release'), eq(variables['Build.SourceBranch'], 'refs/heads/master'), startsWith(variables['Build.SourceBranch'],'refs/tags/'))))
81+
82+
- task: CopyFiles@2
83+
displayName: 'Copy SignList.xml Files'
84+
inputs:
85+
Contents: build/SignList.xml
86+
TargetFolder: '$(build.artifactstagingdirectory)/nuget/release'
87+
flattenFolders: true
6888

6989
- task: PublishBuildArtifacts@1
7090
displayName: 'Publish Artifact: nuget'

Diff for: build/steps/build-sign.yml

-28
This file was deleted.

0 commit comments

Comments
 (0)