File tree Expand file tree Collapse file tree 2 files changed +16
-3
lines changed
Expand file tree Collapse file tree 2 files changed +16
-3
lines changed Original file line number Diff line number Diff line change @@ -68,6 +68,13 @@ stages:
6868 feedsToUse : select
6969 restoreArguments : --locked-mode
7070
71+ - task : GetAzureAuthToken@5
72+ name : KeyVaultToken
73+ displayName : Get token to code signing certificate
74+ inputs :
75+ ServiceConnection : Code signer
76+ AccessScopes : https://vault.azure.net/.default
77+
7178 - task : DotNetCoreCLI@2
7279 displayName : Build
7380 inputs :
@@ -76,7 +83,7 @@ stages:
7683 configuration : ${{ variables.Configuration }}
7784 arguments : --no-restore --verbosity Detailed
7885 env :
79- AuthenticodeClientSecret : $(AuthenticodeClientSecret )
86+ AuthenticodeAccessToken : $(KeyVaultToken.AuthToken )
8087 # Roll-forward behavior set for AzureSignTool dotnet tool (see .config\dotnet-tools.json) which requires .Net 6.0 runtime
8188 DOTNET_ROLL_FORWARD : Major
8289
@@ -90,6 +97,10 @@ stages:
9097 includesymbols : true
9198 nobuild : false
9299 versioningScheme : off
100+ env :
101+ AuthenticodeAccessToken : $(KeyVaultToken.AuthToken)
102+ # Roll-forward behavior set for AzureSignTool dotnet tool (see .config\dotnet-tools.json) which requires .Net 6.0 runtime
103+ DOTNET_ROLL_FORWARD : Major
93104
94105 - publish : $(System.DefaultWorkingDirectory)/packages
95106 displayName : Publish NuGet package as artifact
Original file line number Diff line number Diff line change 11<Project >
2- <Target Name =" SignAssemblyWithAuthenticodeSignature" AfterTargets =" AfterBuild" Condition =" '$(MSBuildProjectFullPath.Contains(" node_modules" ))' == 'false' And $(Configuration) == 'Release' And $(SIGN_FILE) != 'false '" >
2+ <Target Name =" SignAssemblyWithAuthenticodeSignature" AfterTargets =" AfterBuild" Condition =" '$(MSBuildProjectFullPath.Contains(" node_modules" ))' == 'false' And $(Configuration) == 'Release' And $(SIGN_FILE) == 'true '" >
33 <PropertyGroup >
44 <XmlSerializersTargetPath >$(TargetDir)$(TargetName).XmlSerializers.dll</XmlSerializersTargetPath >
55 </PropertyGroup >
88 <AssemblyToSign Include =" $(TargetPath)" />
99 <AssemblyToSign Include =" $(XmlSerializersTargetPath)" Condition =" Exists('$(XmlSerializersTargetPath)')" />
1010 </ItemGroup >
11+
12+ <Exec Command =" dotnet AzureSignTool sign --azure-key-vault-url $(AuthenticodeKeyVaultUrl) --azure-key-vault-accesstoken $(AuthenticodeAccessToken) --azure-key-vault-certificate $(AuthenticodeCertificateName) --timestamp-rfc3161 $(TimestampServerUrl) --skip-signed %(AssemblyToSign.Identity)" />
1113 </Target >
1214
1315 <ItemGroup >
1416 <Content Remove =" Admin/Client/*.json" />
1517 <Content Remove =" Admin/FrontEnd/*.json" />
1618 <Content Remove =" Admin/*.json" />
17- <Content Remove =" ../Kentico.Xperience.TagManager/*.json" />
19+ <Content Remove =" ../Kentico.Xperience.TagManager/*.json" />
1820 </ItemGroup >
1921</Project >
You can’t perform that action at this time.
0 commit comments