зеркало из
1
0
Форкнуть 0
This commit is contained in:
Claire Novotny 2021-04-28 15:35:00 -04:00
Родитель 000a16900e
Коммит d1c5aa1452
Не удалось извлечь подпись
7 изменённых файлов: 170 добавлений и 1 удалений

36
.editorconfig Normal file
Просмотреть файл

@ -0,0 +1,36 @@
# EditorConfig is awesome:http://EditorConfig.org
# top-most EditorConfig file
root = true
# Don't use tabs for indentation.
[*]
charset = utf-8-bom
indent_style = space
# (Please don't specify an indent_size here; that has too many unintended consequences.)
# Use tabs for solution files.
[*.sln]
indent_style = tab
indent_size = 4
# Code files
[*.{cs,csx,vb,vbx}]
indent_size = 4
# Script files
[*.{cmd,bat,ps1}]
indent_size = 4
# Xml project files
[*.{csproj,vbproj,vcxproj,vcxproj.filters,proj,projitems,shproj}]
indent_size = 2
# Xml config files
[*.{props,targets,ruleset,config,nuspec,resx,vsixmanifest,vsct}]
indent_size = 2
# JSON/YAML files
[*.{json,yml,yaml}]
indent_size = 2

Просмотреть файл

@ -3,7 +3,17 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.28902.138
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DotNet.Reproducible-Builds", "src\DotNet.Reproducible-Builds\DotNet.Reproducible-Builds.csproj", "{0EC324B8-28BF-47A9-A9A2-120E1BA880F7}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DotNet.ReproducibleBuilds", "src\DotNet.ReproducibleBuilds\DotNet.ReproducibleBuilds.csproj", "{0EC324B8-28BF-47A9-A9A2-120E1BA880F7}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{8602DDAA-ED69-48FE-A497-931E962B3E42}"
ProjectSection(SolutionItems) = preProject
.editorconfig = .editorconfig
.gitattributes = .gitattributes
.gitignore = .gitignore
azure-pipelines.yml = azure-pipelines.yml
README.md = README.md
version.json = version.json
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution

88
azure-pipelines.yml Normal file
Просмотреть файл

@ -0,0 +1,88 @@
trigger:
- main
- rel/*
pr:
- main
- rel/*
stages:
- stage: Build
jobs:
- job: Build
pool:
vmImage: windows-latest
variables:
BuildConfiguration: Release
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
steps:
- task: UseDotNet@2
displayName: 'Use .NET Core SDK 5.x'
inputs:
version: 5.x
- task: DotNetCoreCLI@2
inputs:
command: custom
custom: tool
arguments: install --tool-path . nbgv
displayName: Install NBGV tool
- script: nbgv cloud
displayName: Set Version
- task: DotNetCoreCLI@2
inputs:
command: pack
packagesToPack: src/DotNet.ReproducibleBuilds/DotNet.ReproducibleBuilds.csproj
configuration: $(BuildConfiguration)
packDirectory: $(Build.ArtifactStagingDirectory)\Packages
verbosityPack: Minimal
displayName: Build Package
- publish: $(Build.ArtifactStagingDirectory)\Packages
displayName: Publish build packages
artifact: BuildPackages
- publish: config
displayName: Publish signing config
artifact: config
- stage: CodeSign
condition: and(succeeded('Build'), not(eq(variables['build.reason'], 'PullRequest')))
jobs:
- deployment: CodeSign
displayName: Code Signing
pool:
vmImage: windows-latest
environment: Code Sign - CI
variables:
- group: SignClient-DNF
strategy:
runOnce:
deploy:
steps:
- task: DotNetCoreCLI@2
inputs:
command: custom
custom: tool
arguments: install --tool-path . SignClient
displayName: Install SignTool tool
- pwsh: |
.\SignClient "Sign" `
--baseDirectory "$(Pipeline.Workspace)\BuildPackages" `
--input "**/*.nupkg" `
--config "$(Pipeline.Workspace)\config\SignClient.json" `
--user "$(SignClientUser)" `
--secret "$(SignClientSecret)" `
--name "OSVersionHelper" `
--description "OSVersionHelper" `
--descriptionUrl "https://github.com/dotnet/reproducible-builds"
displayName: Sign packages
- publish: $(Pipeline.Workspace)/BuildPackages
displayName: Publish Signed Packages
artifact: SignedPackages

13
config/SignClient.json Normal file
Просмотреть файл

@ -0,0 +1,13 @@
{
"SignClient": {
"AzureAd": {
"AADInstance": "https://login.microsoftonline.com/",
"ClientId": "c248d68a-ba6f-4aa9-8a68-71fe872063f8",
"TenantId": "16076fdc-fcc1-4a15-b1ca-32c9a255900e"
},
"Service": {
"Url": "https://codesign.dotnetfoundation.org/",
"ResourceId": "https://SignService/3c30251f-36f3-490b-a955-520addb85001"
}
}
}

12
src/Directory.Build.props Normal file
Просмотреть файл

@ -0,0 +1,12 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Label="PackageInfo">
<Authors>.NET Foundation and Contributors</Authors>
<Copyright>© .NET Foundation</Copyright>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<PackageProjectUrl>https://github.com/novotnyllc/MSBuildSdkExtras</PackageProjectUrl>
<PackageLicenseUrl>https://github.com/novotnyllc/MSBuildSdkExtras/blob/master/LICENSE.md</PackageLicenseUrl>
<PackageReleaseNotes>https://github.com/novotnyllc/MSBuildSdkExtras/blob/master/README.md</PackageReleaseNotes>
</PropertyGroup>
</Project>

10
version.json Normal file
Просмотреть файл

@ -0,0 +1,10 @@
{
"version": "0.1",
"publicReleaseRefSpec": [
"^refs/heads/main$", // we release out of main
"^refs/heads/rel/v\\d+\\.\\d+" // we also release branches starting with rel/vN.N
],
"nugetPackageVersion":{
"semVer": 2
}
}