2019-09-24 04:24:05 +00:00
|
|
|
# .NET Desktop
|
2019-10-12 05:06:16 +00:00
|
|
|
|
2019-09-24 04:24:05 +00:00
|
|
|
# Build and run tests for .NET Desktop or Windows classic desktop solutions.
|
|
|
|
# Add steps that publish symbols, save build artifacts, and more:
|
|
|
|
# https://docs.microsoft.com/azure/devops/pipelines/apps/windows/dot-net
|
|
|
|
|
|
|
|
trigger:
|
2020-08-04 14:59:39 +00:00
|
|
|
- master
|
2019-09-24 04:24:05 +00:00
|
|
|
|
|
|
|
pool:
|
2019-10-25 03:27:17 +00:00
|
|
|
name: Default
|
2019-09-24 04:24:05 +00:00
|
|
|
vmImage: 'windows-latest'
|
|
|
|
|
|
|
|
variables:
|
2019-10-16 21:04:01 +00:00
|
|
|
- group: main-pipeline-keys
|
2019-10-16 21:02:04 +00:00
|
|
|
- name: solution
|
|
|
|
value: 'Wabbajack.sln'
|
|
|
|
- name: buildPlatform
|
|
|
|
value: 'x64'
|
|
|
|
- name: buildConfiguration
|
|
|
|
value: 'Debug'
|
2019-09-24 04:24:05 +00:00
|
|
|
|
|
|
|
steps:
|
2019-09-24 20:12:03 +00:00
|
|
|
- checkout: self
|
|
|
|
clean: true
|
|
|
|
submodules: true
|
|
|
|
|
2019-09-24 04:24:05 +00:00
|
|
|
- task: NuGetToolInstaller@1
|
|
|
|
|
|
|
|
- task: NuGetCommand@2
|
|
|
|
inputs:
|
|
|
|
restoreSolution: '$(solution)'
|
|
|
|
|
2020-02-01 18:03:36 +00:00
|
|
|
- task: DotNetCoreCLI@2
|
|
|
|
displayName: "Build Release"
|
2019-09-24 04:24:05 +00:00
|
|
|
inputs:
|
2020-02-01 18:03:36 +00:00
|
|
|
command: 'build'
|
|
|
|
projects: 'Wabbajack\Wabbajack.csproj'
|
|
|
|
arguments: '--runtime win10-x64 --configuration Release /p:Platform=x64'
|
2020-04-07 20:08:12 +00:00
|
|
|
|
2020-01-28 23:24:32 +00:00
|
|
|
- task: DotNetCoreCLI@2
|
2020-02-01 18:03:36 +00:00
|
|
|
displayName: "Test Release"
|
2019-09-24 04:24:05 +00:00
|
|
|
inputs:
|
2020-01-28 23:24:32 +00:00
|
|
|
command: 'test'
|
|
|
|
projects: '**/*.Test.csproj'
|
2020-04-07 20:34:20 +00:00
|
|
|
arguments: '/p:Platform=x64 /p:CollectCoverage=true /p:CoverletOutputFormat=cobertura /p:CoverletOutput=$(Build.SourcesDirectory)/CodeCoverage'
|
2020-01-28 04:58:31 +00:00
|
|
|
|
2020-02-01 17:49:19 +00:00
|
|
|
- task: DotNetCoreCLI@2
|
|
|
|
inputs:
|
|
|
|
command: 'publish'
|
2020-02-01 18:21:05 +00:00
|
|
|
publishWebProjects: false
|
2020-02-01 17:49:19 +00:00
|
|
|
projects: 'Wabbajack\Wabbajack.csproj'
|
2020-02-01 18:21:05 +00:00
|
|
|
zipAfterPublish: false
|
|
|
|
modifyOutputPath: false
|
2020-02-08 01:48:01 +00:00
|
|
|
arguments: '--runtime win10-x64 --configuration Release /p:Platform=x64 -o $(System.DefaultWorkingDirectory)/PublishApp --self-contained'
|
|
|
|
|
|
|
|
- task: DotNetCoreCLI@2
|
|
|
|
inputs:
|
|
|
|
command: 'publish'
|
|
|
|
publishWebProjects: false
|
|
|
|
projects: 'Wabbajack.Launcher\Wabbajack.Launcher.csproj'
|
|
|
|
zipAfterPublish: false
|
|
|
|
modifyOutputPath: false
|
|
|
|
arguments: '--runtime win10-x64 --configuration Release /p:Platform=x64 -o $(System.DefaultWorkingDirectory)/PublishLauncher --self-contained'
|
2020-02-01 17:49:19 +00:00
|
|
|
|
2019-10-12 05:06:16 +00:00
|
|
|
- task: DownloadSecureFile@1
|
|
|
|
inputs:
|
2020-10-03 01:45:30 +00:00
|
|
|
secureFile: 'CodeCert2020.pfx'
|
2019-10-12 05:00:04 +00:00
|
|
|
- task: codesigning@2
|
2020-02-08 04:28:07 +00:00
|
|
|
displayName: "Sign main app"
|
2019-10-12 14:33:24 +00:00
|
|
|
condition: eq(variables['Build.SourceBranch'], 'refs/heads/master')
|
2019-10-12 05:00:04 +00:00
|
|
|
inputs:
|
2020-10-03 01:45:30 +00:00
|
|
|
secureFileId: 'CodeCert2020.pfx'
|
2019-10-12 05:00:04 +00:00
|
|
|
signCertPassword: '$(CertPassword)'
|
2020-02-08 04:40:28 +00:00
|
|
|
files: '$(System.DefaultWorkingDirectory)/PublishApp/*abbajack*.exe'
|
2019-10-12 05:00:04 +00:00
|
|
|
hashingAlgorithm: 'SHA256'
|
|
|
|
description: 'Wabbajack Modlist Installer'
|
2020-02-01 17:49:19 +00:00
|
|
|
|
2020-02-08 04:28:07 +00:00
|
|
|
- task: codesigning@2
|
|
|
|
displayName: "Sign launcher"
|
|
|
|
condition: eq(variables['Build.SourceBranch'], 'refs/heads/master')
|
|
|
|
inputs:
|
2020-10-03 01:45:30 +00:00
|
|
|
secureFileId: 'CodeCert2020.pfx'
|
2020-02-08 04:28:07 +00:00
|
|
|
signCertPassword: '$(CertPassword)'
|
2020-02-08 04:40:28 +00:00
|
|
|
files: '$(System.DefaultWorkingDirectory)/PublishLauncher/*abbajack*.exe'
|
2020-02-08 04:28:07 +00:00
|
|
|
hashingAlgorithm: 'SHA256'
|
2020-02-08 04:40:28 +00:00
|
|
|
description: 'Wabbajack Modlist Installer Launcher'
|
2020-02-08 04:28:07 +00:00
|
|
|
|
2020-02-01 17:49:19 +00:00
|
|
|
|
|
|
|
|
2019-12-23 22:32:26 +00:00
|
|
|
#- task: CmdLine@2
|
|
|
|
# inputs:
|
|
|
|
# script: 'pip install requests'
|
2019-12-13 22:05:13 +00:00
|
|
|
#- task: PythonScript@0
|
|
|
|
# condition: eq(variables['Build.SourceBranch'], 'refs/heads/master')
|
|
|
|
# inputs:
|
|
|
|
# scriptSource: 'inline'
|
|
|
|
# script: |
|
|
|
|
# import requests, sys
|
|
|
|
#
|
|
|
|
# url = 'https://www.virustotal.com/vtapi/v2/file/scan'
|
|
|
|
#
|
|
|
|
# params = {'apikey': sys.argv[1]}
|
|
|
|
#
|
|
|
|
# files = {'file': ('Wabbajack.exe', open(sys.argv[2], 'rb'))}
|
|
|
|
#
|
|
|
|
# response = requests.post(url, files=files, params=params)
|
|
|
|
#
|
|
|
|
# print(response.json())
|
|
|
|
# arguments: '$(VirusTotalAPIKey) $(System.DefaultWorkingDirectory)/Wabbajack/bin/x64/Debug/Wabbajack.exe'
|
|
|
|
#
|
2020-01-31 21:40:55 +00:00
|
|
|
|
2020-02-01 17:49:19 +00:00
|
|
|
|
2020-02-01 17:33:00 +00:00
|
|
|
|
2020-01-31 21:40:55 +00:00
|
|
|
- task: ArchiveFiles@2
|
|
|
|
inputs:
|
2020-02-08 01:48:01 +00:00
|
|
|
rootFolderOrFile: '$(System.DefaultWorkingDirectory)/PublishApp'
|
2020-01-31 21:40:55 +00:00
|
|
|
includeRootFolder: false
|
|
|
|
archiveType: 'zip'
|
2020-02-01 00:07:32 +00:00
|
|
|
archiveFile: '$(Build.ArtifactStagingDirectory)/Wabbajack.zip'
|
2020-01-31 21:40:55 +00:00
|
|
|
replaceExistingArchive: true
|
|
|
|
verbose: true
|
|
|
|
|
2020-01-28 23:51:25 +00:00
|
|
|
- task: PublishBuildArtifacts@1
|
|
|
|
condition: eq(variables['Build.SourceBranch'], 'refs/heads/master')
|
|
|
|
inputs:
|
2020-01-31 22:00:18 +00:00
|
|
|
PathtoPublish: '$(Build.ArtifactStagingDirectory)/Wabbajack.zip'
|
2020-01-31 21:40:55 +00:00
|
|
|
ArtifactName: 'Wabbajack.zip'
|
2020-01-28 23:51:25 +00:00
|
|
|
publishLocation: 'Container'
|
2020-02-08 01:48:01 +00:00
|
|
|
|
|
|
|
- task: PublishBuildArtifacts@1
|
|
|
|
condition: eq(variables['Build.SourceBranch'], 'refs/heads/master')
|
|
|
|
inputs:
|
2020-02-08 05:00:14 +00:00
|
|
|
PathtoPublish: '$(System.DefaultWorkingDirectory)/PublishLauncher/Wabbajack.exe'
|
2020-02-08 01:48:01 +00:00
|
|
|
ArtifactName: 'Wabbajack.exe'
|
|
|
|
publishLocation: 'Container'
|