forked from janheski/Hashgraph
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathazure-pipelines.yml
65 lines (58 loc) · 2.35 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
# Required Variables set by external Pipeline Configuration
#
# buildConfiguration: Build Configuration Type, for example 'Release'
# Build.ArtifactStagingDirectory: Directory to stage artifact assembly.
# nugetConnection: Nuget Publishing Service Connection Name.
# mirrorRestUrl: Address of the target network's Mirror Node REST API
# mirrorGrpcUrl: Address of the target network's Mirror Node GRPC Endpoint
# payerPrivateKey: Private Key of test account making requests of the network, DER encoded in Hex
jobs:
- job: primary
timeoutInMinutes: 0
steps:
- task: DotNetCoreInstaller@0
displayName: 'Ensure .Net 8.0.100'
inputs:
version: '8.0.100'
- task: DotNetCoreCLI@2
displayName: Restore Dependencies
inputs:
command: restore
projects: '**/*.csproj'
- task: DotNetCoreCLI@2
displayName: Build Projects
inputs:
command: build
projects: '**/*.csproj'
arguments: '--configuration $(buildConfiguration)'
- task: DotNetCoreCLI@2
displayName: Run Automated Tests
inputs:
command: test
projects: 'test/**/*.csproj'
nobuild: true
arguments: '--configuration $(buildConfiguration) --no-build --verbosity detailed'
publishTestResults: true
env:
'mirrorRestUrl': $(mirrorRestUrl)
'mirrorGrpcUrl': $(mirrorGrpcUrl)
'payerPrivateKey': $(payerPrivateKey)
- task: DotNetCoreCLI@2
displayName: Create NuGet Packages
inputs:
command: pack
projects: src/**/*.csproj
nobuild: true
arguments: '--no-build --configuration $(buildConfiguration) --output $(Build.ArtifactStagingDirectory)'
- task: PublishBuildArtifacts@1
displayName: Save Package Artifacts
inputs:
artifactName: packages
pathtoPublish: '$(Build.ArtifactStagingDirectory)'
- task: NuGetCommand@2
displayName: Publish NugGet Packages
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/main'), not(eq('n/a',coalesce(variables['nugetConnection'],'n/a'))))
inputs:
command: push
nuGetFeedType: external
publishFeedCredentials: $(nugetConnection)