-
Notifications
You must be signed in to change notification settings - Fork 6
/
build.yml
60 lines (60 loc) · 2.17 KB
/
build.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
stages:
- stage: build
displayName: Build .NET Project
jobs:
- job: dotnetpub
displayName: Publish .NET Project Artifacts
pool:
vmImage: ubuntu-latest
container: mcr.microsoft.com/dotnet/core/sdk:3.1
steps:
- script: dotnet --version
displayName: Check .NET Version
- script: dotnet publish --configuration Release --output $(Build.ArtifactStagingDirectory)/win --self-contained --runtime win-x64 /p:PublishSingleFile=true /p:IncludeSymbolsInSingleFile=true
displayName: Publish Windows application
workingDirectory: src/Phonetic.Speller.Console
- script: dotnet publish --configuration Release --output $(Build.ArtifactStagingDirectory)/linux --self-contained --runtime linux-x64 /p:PublishSingleFile=true /p:IncludeSymbolsInSingleFile=true
displayName: Publish Linux application
workingDirectory: src/Phonetic.Speller.Console
- task: PublishBuildArtifacts@1
displayName: Publish Build Artifact
inputs:
pathtoPublish: $(Build.ArtifactStagingDirectory)
artifactName: distributions
- stage: publish
displayName: Publish application
jobs:
- job: publish_dockerhub
displayName: Publish to Docker Hub
steps:
- task: Docker@2
displayName: Login to Docker Hub
inputs:
command: login
containerRegistry: dh_sidneyandrews
- task: Docker@2
displayName: Build Container Image and Push to Docker Hub
inputs:
containerRegistry: dh_sidneyandrews
repository: seesharprun/pspell
command: buildAndPush
tags: |
$(Build.BuildNumber)
latest
- job: publish_github
displayName: Publish to GitHub
steps:
- task: DownloadBuildArtifacts@0
displayName: Download Build Artifact
inputs:
buildType: current
artifactName: distributions
downloadPath: $(Build.ArtifactStagingDirectory)
- task: GitHubRelease@0
displayName: Create GitHub Release
inputs:
gitHubConnection: gh_seesharprun
repositoryName: seesharprun/pspell
tagSource: manual
tag: $(Build.BuildNumber)
assets: $(Build.ArtifactStagingDirectory)/distributions/**/*