generated from Kentico/repo-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit d2a1a9a
Showing
27 changed files
with
1,221 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,139 @@ | ||
name: "$(Build.DefinitionName) #$(Build.BuildId)" | ||
|
||
trigger: none # Manual Publish | ||
pr: none # GitHub Actions handle PRs | ||
|
||
parameters: | ||
- name: AgentPoolName | ||
displayName: Agent pool name | ||
type: string | ||
default: ADO Windows Server 2022 | ||
|
||
- name: AgentName | ||
displayName: Agent name - single char for any | ||
type: string | ||
default: " " | ||
|
||
|
||
resources: | ||
repositories: | ||
- repository: self | ||
type: git | ||
|
||
containers: | ||
- container: Windows | ||
image: base/mcr-dotnet-sdk-8.0-servercore-ltsc2022:release | ||
endpoint: xperienceagentshub.azurecr.io | ||
|
||
variables: | ||
- name: SIGN_FILE | ||
value: true | ||
|
||
stages: | ||
- stage: Build | ||
jobs: | ||
- job: Build | ||
displayName: Build, Sign, and Pack | ||
|
||
pool: | ||
name: ${{ parameters.AgentPoolName }} | ||
${{ if ne(length(parameters.AgentName), 1) }}: | ||
demands: | ||
- Agent.Name -equals ${{ parameters.AgentName }} | ||
container: Windows | ||
|
||
variables: | ||
- group: Code Sign KV Auth | ||
|
||
- name: Configuration | ||
value: Release | ||
|
||
- name: ProjectPath | ||
value: src/PROJECT_NAME/PROJECT_NAME.csproj | ||
|
||
steps: | ||
- task: DotNetCoreCLI@2 | ||
displayName: Restore dotnet tools | ||
inputs: | ||
command: custom | ||
custom: tool | ||
arguments: restore | ||
workingDirectory: $(System.DefaultWorkingDirectory) | ||
|
||
- task: DotNetCoreCLI@2 | ||
displayName: Restore dependencies | ||
inputs: | ||
command: restore | ||
projects: ${{ variables.ProjectPath }} | ||
feedsToUse: select | ||
restoreArguments: --locked-mode | ||
|
||
- task: DotNetCoreCLI@2 | ||
displayName: Build | ||
inputs: | ||
command: build | ||
projects: ${{ variables.ProjectPath }} | ||
configuration: ${{ variables.Configuration }} | ||
arguments: --no-restore | ||
env: | ||
AuthenticodeClientSecret: $(AuthenticodeClientSecret) | ||
# Roll-forward behavior set for AzureSignTool dotnet tool (see .config\dotnet-tools.json) which requires .Net 6.0 runtime | ||
DOTNET_ROLL_FORWARD: Major | ||
|
||
- task: DotNetCoreCLI@2 | ||
displayName: Create NuGet package | ||
inputs: | ||
command: pack | ||
packagesToPack: ${{ variables.ProjectPath }} | ||
configuration: ${{ variables.Configuration }} | ||
packDirectory: $(System.DefaultWorkingDirectory)/packages | ||
includesymbols: true | ||
nobuild: true | ||
versioningScheme: off | ||
|
||
- publish: $(System.DefaultWorkingDirectory)/packages | ||
displayName: Publish NuGet package as artifact | ||
artifact: artifact | ||
|
||
- ${{ if eq(variables['Build.SourceBranch'], 'refs/heads/main') }}: | ||
- stage: PublishNuGetPackages | ||
displayName: Publish NuGet packages | ||
dependsOn: Build | ||
|
||
jobs: | ||
- deployment: PublishNuGetPackages | ||
displayName: Publish NuGet packages | ||
|
||
pool: | ||
name: ${{ parameters.AgentPoolName }} | ||
${{ if ne(length(parameters.AgentName), 1) }}: | ||
demands: | ||
- Agent.Name -equals ${{ parameters.AgentName }} | ||
container: Windows | ||
|
||
environment: integrations-release-nuget | ||
workspace: | ||
clean: all | ||
strategy: | ||
runOnce: | ||
deploy: | ||
steps: | ||
- checkout: none | ||
|
||
- task: NuGetToolInstaller@1 | ||
displayName: Install latest nuget.exe | ||
inputs: | ||
versionSpec: ">=5.6" | ||
checkLatest: true | ||
|
||
- task: NuGetAuthenticate@1 | ||
displayName: NuGet Authenticate | ||
|
||
- task: NuGetCommand@2 | ||
displayName: NuGet push | ||
inputs: | ||
command: push | ||
packagesToPush: $(Pipeline.Workspace)/artifact/*.nupkg | ||
nuGetFeedType: external | ||
publishFeedCredentials: nuget.org | ||
allowPackageConflicts: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"version": 1, | ||
"isRoot": true, | ||
"tools": { | ||
"azuresigntool": { | ||
"version": "4.0.1", | ||
"commands": [ | ||
"azuresigntool" | ||
] | ||
} | ||
} | ||
} |
Oops, something went wrong.