-
Notifications
You must be signed in to change notification settings - Fork 19
/
azure-pipelines.yml
executable file
·73 lines (72 loc) · 2.59 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
65
66
67
68
69
70
71
72
73
trigger:
- production
stages:
- stage: Build
displayName: Compile Native for Linux & Windows
jobs:
- job: Build
displayName: Build
steps:
- task: Bash@3
displayName: Version bump
inputs:
targetType: inline
script: |
sudo apt update
sudo apt install jq -y
version=$(jq -r ".version" package.json)
version=$(echo $version | perl -pe 's/\.[\d]+$/.$(Build.BuildId)/')
jq --arg version $version '.version=$version' package.json > package.tmp.json && mv package.tmp.json package.json
echo "Version set to: $version"
- task: PublishPipelineArtifact@1
displayName: Publish Source
inputs:
targetPath: '$(Build.SourcesDirectory)'
artifact: source
- task: NodeTool@0
inputs:
versionSpec: '16.x'
- task: Yarn@3
displayName: Yarn Install
- task: Yarn@3
displayName: 'Pkg Compile'
inputs:
arguments: compile-devops --output bin/dappstarter --targets latest-linux-x64,latest-win-x64
- task: PublishPipelineArtifact@1
displayName: Publish Binaries
inputs:
targetPath: '$(Build.SourcesDirectory)/bin'
artifact: binaries
- stage: MacOS
displayName: Compile Native Binaries for MacOS
pool:
vmImage: MacOS
jobs:
- job: Build
displayName: Build
steps:
- task: Bash@3
displayName: Version bump
inputs:
targetType: 'inline'
script: |
sudo apt update
sudo apt install jq -y
version=$(jq -r ".version" package.json)
version=$(echo $version | perl -pe 's/\.[\d]+$/.$(Build.BuildId)/')
jq --arg version $version '.version=$version' package.json > package.tmp.json && mv package.tmp.json package.json
echo "Version set to: $version"
- task: NodeTool@0
inputs:
versionSpec: '16.x'
- task: Yarn@3
displayName: Yarn Install
- task: Yarn@3
displayName: 'Pkg Compile'
inputs:
arguments: compile-devops --output bin/dappstarter-macos --targets latest-macos-x64
- task: PublishPipelineArtifact@1
displayName: Publish Binaries
inputs:
targetPath: '$(Build.SourcesDirectory)/bin'
artifact: mac-binaries