Skip to content

Commit

Permalink
Add win10, osx and linux builds
Browse files Browse the repository at this point in the history
  • Loading branch information
mehmetseckin committed Nov 15, 2019
1 parent 1b2c07a commit 996a386
Show file tree
Hide file tree
Showing 3 changed files with 72 additions and 0 deletions.
24 changes: 24 additions & 0 deletions pipelines/linux-x64.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
trigger:
- master

pool:
vmImage: 'ubuntu-latest'

variables:
buildConfiguration: 'Release'
solutionFile: $(Build.SourcesDirectory)/src/Todo.CLI.sln
projectDirectory: $(Build.SourcesDirectory)/src/Todo.CLI/
runtimeIdentifier: linux-x64
outputDirectory: $(Build.ArtefactStagingDirectory)/$(runtimeIdentifier)/

steps:
- script: dotnet build $(solutionFile) -c $(buildConfiguration)
displayName: 'Build solution'
- script: dotnet publish $(projectDirectory) -c $(buildConfiguration) -r $(runtimeIdentifier) --self-contained true
displayName: 'Publish self-contained executable for $(runtimeIdentifier)'
- task: PublishBuildArtifacts@1
displayName: 'Publish artefact for $(runtimeIdentifier)'
inputs:
PathtoPublish: '$(Build.ArtifactStagingDirectory)'
ArtifactName: 'todo-cli.$(runtimeIdentifier)'
publishLocation: 'Container'
24 changes: 24 additions & 0 deletions pipelines/osx-x64.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
trigger:
- master

pool:
vmImage: 'ubuntu-latest'

variables:
buildConfiguration: 'Release'
solutionFile: $(Build.SourcesDirectory)/src/Todo.CLI.sln
projectDirectory: $(Build.SourcesDirectory)/src/Todo.CLI/
runtimeIdentifier: osx-x64
outputDirectory: $(Build.ArtefactStagingDirectory)/$(runtimeIdentifier)/

steps:
- script: dotnet build $(solutionFile) -c $(buildConfiguration)
displayName: 'Build solution'
- script: dotnet publish $(projectDirectory) -c $(buildConfiguration) -r $(runtimeIdentifier) --self-contained true
displayName: 'Publish self-contained executable for $(runtimeIdentifier)'
- task: PublishBuildArtifacts@1
displayName: 'Publish artefact for $(runtimeIdentifier)'
inputs:
PathtoPublish: '$(Build.ArtifactStagingDirectory)'
ArtifactName: 'todo-cli.$(runtimeIdentifier)'
publishLocation: 'Container'
24 changes: 24 additions & 0 deletions pipelines/win10-x64.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
trigger:
- master

pool:
vmImage: 'ubuntu-latest'

variables:
buildConfiguration: 'Release'
solutionFile: $(Build.SourcesDirectory)/src/Todo.CLI.sln
projectDirectory: $(Build.SourcesDirectory)/src/Todo.CLI/
runtimeIdentifier: win10-x64
outputDirectory: $(Build.ArtefactStagingDirectory)/$(runtimeIdentifier)/

steps:
- script: dotnet build $(solutionFile) -c $(buildConfiguration)
displayName: 'Build solution'
- script: dotnet publish $(projectDirectory) -c $(buildConfiguration) -r $(runtimeIdentifier) --self-contained true
displayName: 'Publish as self-contained executable for $(runtimeIdentifier)'
- task: PublishBuildArtifacts@1
displayName: 'Publish artefact for $(runtimeIdentifier)'
inputs:
PathtoPublish: '$(Build.ArtifactStagingDirectory)'
ArtifactName: 'todo-cli.$(runtimeIdentifier)'
publishLocation: 'Container'

0 comments on commit 996a386

Please sign in to comment.