mirror of
https://github.com/tribufu/ServerManagers
synced 2026-05-06 15:17:34 +00:00
Update azure-pipelines.yml for Azure Pipelines
This commit is contained in:
parent
de572ae94e
commit
9ec961ad2d
1 changed files with 62 additions and 55 deletions
|
|
@ -22,65 +22,72 @@ variables:
|
|||
- name: PublishFolder
|
||||
value: publish
|
||||
|
||||
steps:
|
||||
- task: NuGetToolInstaller@1
|
||||
displayName: 'Install NuGet 4.4.1'
|
||||
inputs:
|
||||
versionSpec: '4.4.1'
|
||||
stages:
|
||||
- stage: build
|
||||
displayName: Build and Publish
|
||||
|
||||
- task: NuGetCommand@2
|
||||
displayName: 'NuGet restore'
|
||||
inputs:
|
||||
restoreSolution: '$(SolutionFile)'
|
||||
jobs:
|
||||
- job: build
|
||||
displayName: Build and Publish
|
||||
|
||||
- task: PowerShell@2
|
||||
displayName: 'Apply Semantic Versioning to Assemblies'
|
||||
inputs:
|
||||
targetType: filePath
|
||||
filePath: './.azure/scripts/ApplySemanticVersioningToAssemblies.ps1'
|
||||
arguments: "-applicationName $(ApplicationName) -pathToSearch '$(Build.SourcesDirectory)/src' -buildNumber $(Build.BuildNumber) -searchFilter 'AssemblyInfo.*'"
|
||||
pwsh: true
|
||||
steps:
|
||||
- task: NuGetToolInstaller@1
|
||||
displayName: 'Install NuGet 4.4.1'
|
||||
inputs:
|
||||
versionSpec: '4.4.1'
|
||||
|
||||
- task: projectfileprops@1
|
||||
displayName: 'Modify ApplicationVersion In Project File'
|
||||
inputs:
|
||||
path: '$(ProjectFile)'
|
||||
fieldOptions: ApplicationVersion
|
||||
value: '$(VersionMajor).$(VersionMinor).$(VersionBuild).%2a'
|
||||
- task: NuGetCommand@2
|
||||
displayName: 'NuGet restore'
|
||||
inputs:
|
||||
restoreSolution: '$(SolutionFile)'
|
||||
|
||||
- task: projectfileprops@1
|
||||
displayName: 'Modify ApplicationRevision In Project File'
|
||||
inputs:
|
||||
path: '$(ProjectFile)'
|
||||
fieldOptions: ApplicationRevision
|
||||
value: '$(VersionRevision)'
|
||||
- task: PowerShell@2
|
||||
displayName: 'Apply Semantic Versioning to Assemblies'
|
||||
inputs:
|
||||
targetType: filePath
|
||||
filePath: './.azure/scripts/ApplySemanticVersioningToAssemblies.ps1'
|
||||
arguments: "-applicationName $(ApplicationName) -pathToSearch '$(Build.SourcesDirectory)/src' -buildNumber $(Build.BuildNumber) -searchFilter 'AssemblyInfo.*'"
|
||||
pwsh: true
|
||||
|
||||
- task: VSBuild@1
|
||||
displayName: 'Build $(ApplicationName) Project'
|
||||
inputs:
|
||||
solution: '$(ProjectFile)'
|
||||
msbuildArgs: '/t:publish /p:PublishDir="$(Build.ArtifactStagingDirectory)/bin"'
|
||||
platform: '$(BuildPlatform)'
|
||||
configuration: '$(BuildConfiguration)'
|
||||
clean: true
|
||||
- task: projectfileprops@1
|
||||
displayName: 'Modify ApplicationVersion In Project File'
|
||||
inputs:
|
||||
path: '$(ProjectFile)'
|
||||
fieldOptions: ApplicationVersion
|
||||
value: '$(VersionMajor).$(VersionMinor).$(VersionBuild).%2a'
|
||||
|
||||
- task: CopyFiles@2
|
||||
displayName: 'Copy Artifact Files'
|
||||
inputs:
|
||||
SourceFolder: '$(Build.SourcesDirectory)'
|
||||
Contents: |
|
||||
src/$(ApplicationName)/VersionFeed.xml
|
||||
src/$(ApplicationName)/VersionFeedBeta.xml
|
||||
src/$(ApplicationName)/Art\favicon.ico
|
||||
src/$(ApplicationName)/Globalization\en-US\en-US.xaml
|
||||
TargetFolder: '$(Build.ArtifactStagingDirectory)'
|
||||
OverWrite: true
|
||||
flattenFolders: true
|
||||
preserveTimestamp: true
|
||||
- task: projectfileprops@1
|
||||
displayName: 'Modify ApplicationRevision In Project File'
|
||||
inputs:
|
||||
path: '$(ProjectFile)'
|
||||
fieldOptions: ApplicationRevision
|
||||
value: '$(VersionRevision)'
|
||||
|
||||
- task: PublishBuildArtifacts@1
|
||||
displayName: 'Publish Artifacts'
|
||||
inputs:
|
||||
PathtoPublish: '$(Build.ArtifactStagingDirectory)'
|
||||
ArtifactName: '$(PublishFolder)'
|
||||
condition: succeededOrFailed()
|
||||
- task: VSBuild@1
|
||||
displayName: 'Build $(ApplicationName) Project'
|
||||
inputs:
|
||||
solution: '$(ProjectFile)'
|
||||
msbuildArgs: '/t:publish /p:PublishDir="$(Build.ArtifactStagingDirectory)/bin"'
|
||||
platform: '$(BuildPlatform)'
|
||||
configuration: '$(BuildConfiguration)'
|
||||
clean: true
|
||||
|
||||
- task: CopyFiles@2
|
||||
displayName: 'Copy Artifact Files'
|
||||
inputs:
|
||||
SourceFolder: '$(Build.SourcesDirectory)'
|
||||
Contents: |
|
||||
src/$(ApplicationName)/VersionFeed.xml
|
||||
src/$(ApplicationName)/VersionFeedBeta.xml
|
||||
src/$(ApplicationName)/Art\favicon.ico
|
||||
src/$(ApplicationName)/Globalization\en-US\en-US.xaml
|
||||
TargetFolder: '$(Build.ArtifactStagingDirectory)'
|
||||
OverWrite: true
|
||||
flattenFolders: true
|
||||
preserveTimestamp: true
|
||||
|
||||
- task: PublishBuildArtifacts@1
|
||||
displayName: 'Publish Artifacts'
|
||||
inputs:
|
||||
PathtoPublish: '$(Build.ArtifactStagingDirectory)'
|
||||
ArtifactName: '$(PublishFolder)'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue