-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathazure-pipelines.yml
57 lines (46 loc) · 1.8 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
trigger:
branches:
include:
- official-api-file-fallback
- localhost-api-docker
pool:
vmImage: 'windows-2019'
variables:
solution: '**/*.sln'
buildConfiguration: 'Release'
dotnetSdkVersion: '7.x'
steps:
- task: UseDotNet@2
inputs:
version: '$(dotnetSdkVersion)'
- script: dotnet restore --no-cache
displayName: 'Restore NuGet packages'
- script: dotnet build --configuration $(buildConfiguration)
displayName: 'Build the project'
- task: CopyFiles@2
inputs:
SourceFolder: "$(Build.SourcesDirectory)/examples/"
Contents: "*"
TargetFolder: $(Build.SourcesDirectory)/bin/Release/net7.0/examples/
displayName: 'Copy examples files to artifacts'
- script: dotnet test --configuration $(buildConfiguration) --logger trx --no-restore
displayName: 'Run unit tests'
- task: PublishBuildArtifacts@1
inputs:
pathtoPublish: '$(Build.SourcesDirectory)/bin/Release/net7.0/'
artifactName: 'original files'
displayName: 'Publish original files'
- task: DotNetReactorTool@0
inputs:
version: "6.9.0.0"
license: '$(licenseDotNetReactor)'
- task: ProtectWithDotNetReactor@1
displayName: 'Protect with .NET Reactor'
inputs:
reactorProjectFilePath: '$(Build.SourcesDirectory)\bin\Release\net7.0\examples\example-csharp-licensing-Docker.nrproj'
additionalArguments: "-file $(Build.SourcesDirectory)/bin/Release/net7.0/example-csharp-licensing-Docker.dll -antitamp 1 -anti_debug 1 -hide_calls 1 -control_flow 1 -flow_level 9 -resourceencryption 1 -virtualization 1 -necrobit 1"
- task: PublishBuildArtifacts@1
inputs:
pathtoPublish: '$(Build.SourcesDirectory)/bin/Release/net7.0/example-csharp-licensing-Docker_Secure/'
artifactName: 'obfuscated files'
displayName: 'Publish obfuscated files'