Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sign extension with MS Build #4372

Merged
merged 2 commits into from
Aug 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .azure-pipelines/1esmain.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ resources:
ref: main
endpoint: GitHub-AzureTools # The service connection to use when accessing this repository

variables:
# Required by MicroBuild template
- name: TeamName
value: "Container Tools Team"

# Use those templates
extends:
template: azure-pipelines/1esmain.yml@azExtTemplates
29 changes: 29 additions & 0 deletions .azure-pipelines/SignExtension.signproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="Current" Sdk="Microsoft.Build.NoTargets/3.7.56">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<!-- FilesToSign needs to be inside $(OutDir) hence we copy it into
$(OutDir) before (from CWD) and move it back outside after the signing -->
<FilesToSign Include="$(OutDir)\extension.signature.p7s">
<!-- Add the certificate friendly name below -->
<Authenticode>VSCodePublisher</Authenticode>
</FilesToSign>
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.VisualStudioEng.MicroBuild.Core" Version="1.0.0">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
</ItemGroup>

<Target Name="CopySignatureFile" BeforeTargets="SignFiles">
<Copy SourceFiles="$(ProjectDir)\..\extension.manifest" DestinationFiles="$(OutDir)\extension.signature.p7s" />
</Target>

<Target Name="CopyBackSignatureFile" AfterTargets="SignFiles">
<Copy SourceFiles="$(OutDir)\extension.signature.p7s" DestinationFiles="$(ProjectDir)\..\extension.signature.p7s" />
</Target>
</Project>
Loading