-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathazure-pipelines.yml
64 lines (56 loc) · 1.79 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
resources:
repositories:
- repository: Templates
type: github
ref: 'refs/tags/v0.0.1'
name: "HoeflingSoftware/DevOps.Templates"
endpoint: ahoefling
trigger:
branches:
include:
- master
- refs/tags/*
variables:
majorMinorPatch: 1.0.0
revision: $[counter(variables['majorMinorPatch'], 0)]
system.debug: "true"
githubOrganization: 'HoeflingSoftware'
githubRepo: 'Dnn.KeyMaster'
jobs:
- job: Build
displayName: Build and Create Installer
pool:
name: Hosted VS2017
demands:
- MSBuild
steps:
- powershell: '$(System.DefaultWorkingDirectory)\build.ps1 -Target Package -ScriptArgs "-package_version=$env:VERSION"; exit $LASTEXITCODE'
env:
VERSION: "$(majorMinorPatch).$(revision)"
displayName: 'Cake Build - Clean, NuGet, Build and Package'
- task: CopyFiles@2
displayName: 'Copy Files to Artifacts Staging Directory'
inputs:
SourceFolder: '$(System.DefaultWorkingDirectory)'
Contents: '**/*_install.zip'
TargetFolder: '$(Build.ArtifactStagingDirectory)'
flattenFolders: true
- task: PublishBuildArtifacts@1
displayName: 'Publish Artifacts: drop'
inputs:
PathtoPublish: '$(Build.ArtifactStagingDirectory)'
- job: Release
dependsOn: Build
displayName: Release
pool:
name: "Hosted VS2017"
condition: and(succeeded(), startswith(variables['Build.SourceBranch'], 'refs/tags'))
steps:
- template: GitHub/azure-pipelines.yml@Templates
parameters:
githubOrganization: '$(githubOrganization)'
githubRepo: '$(githubRepo)'
githubToken: '$(githubToken)'
publish: 'true'
publishedArtifactPath: 'Dnn.KeyMaster_$(majorMinorPatch).$(revision)_install.zip'
publishedArtifactDisplayName: '$(githubRepo)_$(majorMinorPatch).$(revision)_install.zip'