forked from dotnet/sign
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
72 lines (64 loc) · 1.92 KB
/
azure-pipelines.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
trigger:
branches:
include:
- main
- rel/*
paths:
include:
- src/SignService/*
- scripts/Install-WindowsSdkISO.ps1
- .editorconfig
- azure-pipelines.server.yml
- version.json
pr:
branches:
include:
- main
- rel/*
paths:
include:
- src/SignService/*
- scripts/Install-WindowsSdkISO.ps1
- .editorconfig
- azure-pipelines.yml
- version.json
pool:
vmImage: windows-2022
variables:
BuildConfiguration: Release
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
TreatWarningsAsErrors: true
RuntimeIdentifiers: win10-x86
steps:
- task: UseDotNet@2
displayName: 'Use .NET Core SDK 6.x'
inputs:
version: 6.x
- task: DotNetCoreCLI@2
displayName: Copy sdk files locally before build
inputs:
command: custom
projects: src/SignService/SignService.csproj
custom: msbuild
arguments: '/p:Configuration=$(BuildConfiguration);RuntimeIdentifiers=$(RuntimeIdentifiers) /t:PrebuildScript'
- task: DotNetCoreCLI@2
displayName: Build and Publish
inputs:
command: publish
publishWebProjects: false
projects: src/SignService/SignService.csproj
arguments: '-c $(BuildConfiguration) --output $(build.artifactstagingdirectory)\website\ -r $(RuntimeIdentifiers) --self-contained'
zipAfterPublish: True
- task: AzureCLI@2
displayName: Deploy SignService
condition: and(succeeded(), ne(variables['Build.Reason'], 'PullRequest'),eq(variables['Build.SourceBranch'], 'refs/heads/main'))
inputs:
azureSubscription: 'Speedy-geek AzureRm'
scriptType: 'pscore'
scriptLocation: 'inlineScript'
workingDirectory: $(Build.ArtifactStagingDirectory)\website
inlineScript: |
az webapp deploy --clean true --resource-group SignService_website --name speedygeeksign --src-path ./SignService.zip
- publish: $(Build.ArtifactStagingDirectory)\website
displayName: Publish SignService Artifact
artifact: SignService