-
Notifications
You must be signed in to change notification settings - Fork 1
/
azure-pipelines-publish.yml
96 lines (79 loc) · 2.22 KB
/
azure-pipelines-publish.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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
trigger: none
variables:
YARN_CACHE_FOLDER: $(Pipeline.Workspace)/.yarn
WORKSPACE_DIR: $(Pipeline.Workspace)
pool: 'Agent Pool'
steps:
#- task: Bash@3
# displayName: 'Remove old code'
# inputs:
# targetType: 'inline'
# script: 'rm -rf $(WORKSPACE_DIR)/* && rm -rf $(YARN_CACHE_FOLDER)/'
- checkout: self
clean: true
lfs: false
submodules: false
persistCredentials: true
#- task: Bash@3
# displayName: 'install latest Git'
# inputs:
# targetType: 'inline'
# script: 'sudo apt-add-repository ppa:git-core/ppa -y && sudo apt-get update && sudo apt-get install git -y && git version'
- task: Bash@3
displayName: 'git switch master'
inputs:
targetType: 'inline'
script: 'pwd && ls -la && git switch master'
- task: Bash@3
displayName: 'install node 18.14.0'
inputs:
targetType: 'inline'
script: 'sudo n 18.14.0'
- task: Bash@3
displayName: 'show environment Variables'
inputs:
targetType: 'inline'
script: 'env | sort'
- task: Bash@3
displayName: 'install make'
inputs:
targetType: 'inline'
script: 'sudo apt-get update -y && sudo apt-get install -y make && sudo apt install -y g++'
- task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@3
displayName: 'Use Yarn 1.x'
- task: Cache@2
displayName: 'Yarn Cache'
inputs:
key: 'yarn | "$(Agent.OS) | yarn.lock'
path: $(YARN_CACHE_FOLDER)
cacheHitVar: 'YARN_CACHE_HIT'
enabled: true
- task: geeklearningio.gl-vsts-tasks-yarn.yarn-task.Yarn@2
displayName: 'Yarn Install'
inputs:
Arguments: install --frozen-lockfile --ignore-engines
- task: geeklearningio.gl-vsts-tasks-yarn.yarn-task.Yarn@2
displayName: 'Yarn Release'
inputs:
Arguments: release
- task: Bash@3
displayName: 'git push'
inputs:
targetType: 'inline'
script: 'git push --follow-tags'
- task: Bash@3
displayName: 'Fix permissions for .npm folder'
inputs:
targetType: 'inline'
script: 'sudo chown -R 1000:1000 "/home/AzDevOps/.npm"'
- task: Npm@1
inputs:
command: publish
verbose: true
publishRegistry: useExternalRegistry
publishEndpoint: 'npmjs.com'
- task: Bash@3
displayName: 'show environment Variables end'
inputs:
targetType: 'inline'
script: 'env | sort'