mirror of
https://github.com/Artemis-RGB/Artemis
synced 2025-12-13 05:48:35 +00:00
Update azure-pipelines.yml for Azure Pipelines
This commit is contained in:
parent
7f66ccaa4d
commit
eec7661bdc
@ -6,37 +6,44 @@
|
|||||||
trigger:
|
trigger:
|
||||||
- master
|
- master
|
||||||
|
|
||||||
|
resources:
|
||||||
|
repositories:
|
||||||
|
- repository: RGBNET
|
||||||
|
type: github
|
||||||
|
endpoint: github.com_SpoinkyNL
|
||||||
|
name: DarthAffe/RGB.NET
|
||||||
|
ref: Development
|
||||||
|
- repository: Plugins
|
||||||
|
type: github
|
||||||
|
endpoint: github.com_SpoinkyNL
|
||||||
|
name: Artemis-RGB/Artemis.Plugins
|
||||||
|
ref: master
|
||||||
|
|
||||||
pool:
|
pool:
|
||||||
vmImage: 'windows-latest'
|
vmImage: 'windows-latest'
|
||||||
|
|
||||||
variables:
|
variables:
|
||||||
artemisSolution: '**/Artemis.sln'
|
artemisSolution: '**/Artemis.sln'
|
||||||
NUGET_PACKAGES: $(Pipeline.Workspace)/.nuget/packages
|
rgbSolution: '**/RGB.NET.sln'
|
||||||
BuildId: $(Build.BuildId)
|
BuildId: $(Build.BuildId)
|
||||||
BuildNumber: $(Build.BuildNumber)
|
BuildNumber: $(Build.BuildNumber)
|
||||||
SourceBranch: $(Build.SourceBranch)
|
SourceBranch: $(Build.SourceBranch)
|
||||||
SourceVersion: $(Build.SourceVersion)
|
SourceVersion: $(Build.SourceVersion)
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
- checkout: RGBNET
|
||||||
|
path: s/RGB.NET
|
||||||
- checkout: self
|
- checkout: self
|
||||||
path: s/Artemis
|
path: s/Artemis
|
||||||
|
- checkout: Plugins
|
||||||
- task: DownloadPipelineArtifact@2
|
path: s/Artemis.Plugins
|
||||||
inputs:
|
|
||||||
buildType: 'specific'
|
|
||||||
project: '882fdc71-c09c-4923-8ab0-2cd9fcf0656d'
|
|
||||||
definition: '3'
|
|
||||||
buildVersionToDownload: 'latest'
|
|
||||||
artifactName: 'RGB.NET development build'
|
|
||||||
targetPath: '$(Pipeline.Workspace)/s/RGB.NET/bin/net5.0'
|
|
||||||
|
|
||||||
- task: DotNetCoreCLI@2
|
- task: DotNetCoreCLI@2
|
||||||
displayName: 'dotnet restore Artemis'
|
displayName: 'Build RGB.NET'
|
||||||
inputs:
|
inputs:
|
||||||
command: 'restore'
|
command: 'build'
|
||||||
projects: '$(artemisSolution)'
|
projects: '$(rgbSolution)'
|
||||||
feedsToUse: 'config'
|
arguments: '--configuration Release'
|
||||||
nugetConfigPath: '$(Pipeline.Workspace)/s/Artemis/src/NuGet.Config'
|
|
||||||
|
|
||||||
- task: DotNetCoreCLI@2
|
- task: DotNetCoreCLI@2
|
||||||
displayName: 'Publish Artemis'
|
displayName: 'Publish Artemis'
|
||||||
@ -48,14 +55,14 @@ steps:
|
|||||||
zipAfterPublish: false
|
zipAfterPublish: false
|
||||||
modifyOutputPath: false
|
modifyOutputPath: false
|
||||||
|
|
||||||
- task: DownloadPipelineArtifact@2
|
- task: PowerShell@2
|
||||||
|
displayName: 'Create buildinfo.json'
|
||||||
inputs:
|
inputs:
|
||||||
buildType: 'specific'
|
targetType: 'inline'
|
||||||
project: '882fdc71-c09c-4923-8ab0-2cd9fcf0656d'
|
script: |
|
||||||
definition: '2'
|
$OFS = "`r`n"
|
||||||
buildVersionToDownload: 'latest'
|
SET-Content -Path 'buildinfo.json' -Value ('{' + $OFS + ' "BuildId": 0,' + $OFS + ' "BuildNumber": 0.0,' + $OFS + ' "SourceBranch": "",' + $OFS + ' "SourceVersion": ""' + $OFS + '}')
|
||||||
artifactName: 'Artemis build'
|
workingDirectory: '$(Build.ArtifactStagingDirectory)/build'
|
||||||
targetPath: '$(Build.ArtifactStagingDirectory)/build'
|
|
||||||
|
|
||||||
- task: FileTransform@1
|
- task: FileTransform@1
|
||||||
displayName: 'Populate buildinfo.json'
|
displayName: 'Populate buildinfo.json'
|
||||||
@ -64,6 +71,29 @@ steps:
|
|||||||
fileType: 'json'
|
fileType: 'json'
|
||||||
targetFiles: '**/buildinfo.json'
|
targetFiles: '**/buildinfo.json'
|
||||||
|
|
||||||
|
- task: PowerShell@2
|
||||||
|
displayName: 'Insert build number into plugin.json'
|
||||||
|
inputs:
|
||||||
|
targetType: 'inline'
|
||||||
|
script: |
|
||||||
|
Get-ChildItem -Recurse -Filter plugin.json |
|
||||||
|
Foreach-Object {
|
||||||
|
$buidNumber = "1.0.1." + $Env:BUILD_BUILDID;
|
||||||
|
$a = Get-Content $_.FullName | ConvertFrom-Json
|
||||||
|
$a.Version = $buidNumber;
|
||||||
|
$a | ConvertTo-Json | Set-Content $_.FullName
|
||||||
|
}
|
||||||
|
workingDirectory: 's/Artemis.Plugins'
|
||||||
|
|
||||||
|
- task: DotNetCoreCLI@2
|
||||||
|
displayName: 'Publish Artemis.Plugins'
|
||||||
|
inputs:
|
||||||
|
command: 'publish'
|
||||||
|
publishWebProjects: false
|
||||||
|
arguments: '--runtime win-x64 --self-contained false --output $(Build.ArtifactStagingDirectory)/build/Plugins'
|
||||||
|
projects: '$(pluginProjects)'
|
||||||
|
zipAfterPublish: true
|
||||||
|
|
||||||
- task: PublishPipelineArtifact@1
|
- task: PublishPipelineArtifact@1
|
||||||
displayName: 'Upload build to Azure Pipelines'
|
displayName: 'Upload build to Azure Pipelines'
|
||||||
inputs:
|
inputs:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user