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:
|
|
|
|
- master
|
|
|
|
|
|
|
|
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-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-01-28 23:38:26 +00:00
|
|
|
arguments: '/p:Platform=x64'
|
2020-01-28 04:58:31 +00:00
|
|
|
|
2020-02-01 17:49:19 +00:00
|
|
|
|
|
|
|
- task: DotNetCoreCLI@2
|
2020-02-01 18:03:36 +00:00
|
|
|
displayName: "Publish Release"
|
2020-02-01 17:49:19 +00:00
|
|
|
inputs:
|
|
|
|
command: 'publish'
|
|
|
|
projects: 'Wabbajack\Wabbajack.csproj'
|
|
|
|
arguments: '--runtime win10-x64 --configuration Release /p:Platform=x64 -o $(System.DefaultWorkingDirectory)/Publish --self-contained'
|
|
|
|
|
2019-10-12 05:06:16 +00:00
|
|
|
- task: DownloadSecureFile@1
|
|
|
|
inputs:
|
2019-10-12 05:08:44 +00:00
|
|
|
secureFile: 'CertFile.p12'
|
2019-10-12 05:00:04 +00:00
|
|
|
- task: codesigning@2
|
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:
|
2019-10-12 05:08:44 +00:00
|
|
|
secureFileId: 'CertFile.p12'
|
2019-10-12 05:00:04 +00:00
|
|
|
signCertPassword: '$(CertPassword)'
|
2020-02-01 17:49:19 +00:00
|
|
|
files: |
|
|
|
|
'$(System.DefaultWorkingDirectory)/Publish/Wabbajack.exe'
|
|
|
|
'$(System.DefaultWorkingDirectory)/Publish/wabbajack-cli.exe'
|
2019-10-12 05:00:04 +00:00
|
|
|
hashingAlgorithm: 'SHA256'
|
|
|
|
description: 'Wabbajack Modlist Installer'
|
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-01 17:33:00 +00:00
|
|
|
rootFolderOrFile: '$(System.DefaultWorkingDirectory)/Publish'
|
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'
|