|
7 | 7 | - script: curl -sSL https://get.haskellstack.org/ | sh
|
8 | 8 | displayName: Install stack
|
9 | 9 |
|
| 10 | + - script: stack build --flag fake-json:-static |
| 11 | + displayName: Build |
| 12 | + |
10 | 13 | - script: stack test
|
11 | 14 | displayName: Run tests
|
12 | 15 |
|
| 16 | + - task: PublishPipelineArtifact@0 |
| 17 | + inputs: |
| 18 | + artifactName: 'fake-json-linux-x86_64' |
| 19 | + targetPath: '.stack-work/install/x86_64-linux/lts-12.20/8.4.4/bin/' |
| 20 | + |
13 | 21 | - job: MacOSTest
|
14 | 22 | pool:
|
15 | 23 | vmImage: 'macOS-10.13'
|
16 | 24 | steps:
|
17 | 25 | - script: curl -sSL https://get.haskellstack.org/ | sh
|
18 | 26 | displayName: Install stack
|
19 | 27 |
|
| 28 | + - script: stack build --flag fake-json:-static |
| 29 | + displayName: Build |
| 30 | + |
20 | 31 | - script: stack test
|
21 | 32 | displayName: Run tests
|
22 | 33 |
|
| 34 | + - task: PublishPipelineArtifact@0 |
| 35 | + inputs: |
| 36 | + artifactName: 'fake-json-osx-x86_64' |
| 37 | + targetPath: '.stack-work/install/x86_64-osx/lts-12.20/8.4.4/bin/' |
| 38 | + |
23 | 39 | - job: WindowsTest
|
24 | 40 | pool:
|
25 | 41 | vmImage: 'VS2017-Win2016'
|
26 | 42 | steps:
|
27 | 43 | - script: choco install haskell-stack
|
28 | 44 | displayName: Install stack
|
29 | 45 |
|
| 46 | + - script: stack build --flag fake-json:-static |
| 47 | + displayName: Build |
| 48 | + |
30 | 49 | - script: stack test
|
31 | 50 | displayName: Run tests
|
| 51 | + |
| 52 | + - task: PublishPipelineArtifact@0 |
| 53 | + inputs: |
| 54 | + artifactName: 'fake-json-windows-x86_64' |
| 55 | + targetPath: '.stack-work\install\ad603a72\bin' |
| 56 | + |
| 57 | + - job: Release |
| 58 | + dependsOn: |
| 59 | + - LinuxTest |
| 60 | + - MacOSTest |
| 61 | + - WindowsTest |
| 62 | + |
| 63 | + steps: |
| 64 | + - script: mkdir -p $(System.DefaultWorkingDirectory)/artifacts/ |
| 65 | + - task: DownloadPipelineArtifact@0 |
| 66 | + inputs: |
| 67 | + artifactName: 'fake-json-windows-x86_64' |
| 68 | + targetPath: $(System.DefaultWorkingDirectory)/artifacts/ |
| 69 | + |
| 70 | + - task: DownloadPipelineArtifact@0 |
| 71 | + inputs: |
| 72 | + artifactName: 'fake-json-osx-x86_64' |
| 73 | + targetPath: $(System.DefaultWorkingDirectory)/artifacts/ |
| 74 | + - script: mv $(System.DefaultWorkingDirectory)/artifacts/fake-json{,-osx-x86_64} |
| 75 | + |
| 76 | + - task: DownloadPipelineArtifact@0 |
| 77 | + inputs: |
| 78 | + artifactName: 'fake-json-linux-x86_64' |
| 79 | + targetPath: $(System.DefaultWorkingDirectory)/artifacts/ |
| 80 | + - script: mv $(System.DefaultWorkingDirectory)/artifacts/fake-json{,-linux-x86_64} |
| 81 | + |
| 82 | + - task: GithubRelease@0 |
| 83 | + inputs: |
| 84 | + gitHubConnection: 'GitHub connection' |
| 85 | + repositoryName: mfussenegger/fake-json |
| 86 | + target: '$(build.sourceVersion)' |
| 87 | + assets: $(System.DefaultWorkingDirectory)/artifacts/* |
| 88 | + tagSource: 'auto' |
| 89 | + isDraft: true |
0 commit comments