forked from carbon-design-system/carbon-icons
-
Notifications
You must be signed in to change notification settings - Fork 7
/
azure-pipelines.yml
57 lines (44 loc) · 1.25 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
trigger:
- master
jobs:
- job: SemanticRelease
pool:
vmImage: 'ubuntu-latest'
variables:
NPM_CACHE_FOLDER: $(Pipeline.Workspace)/.npm
nextRelease: unknown
steps:
- task: NodeTool@0
inputs:
versionSpec: '17.4.0'
displayName: 'Install Node.js'
- script: |
mkdir -p $(NPM_CACHE_FOLDER)
npm -v
npm install
displayName: 'npm install'
- script: |
npm run build
displayName: 'npm run build'
# - script: |
# npm run test
# displayName: 'npm run test'
- script: >
npm run semantic-release
env: { GH_TOKEN: $(GitHubToken) }
displayName: 'Semantic release'
# - script: >
# npx -p semantic-release
# -p @semantic-release/git
# -p @semantic-release/changelog
# -p semantic-release-ado
# semantic-release
# env: { GH_TOKEN: $(GitHubToken) }
# displayName: 'Semantic release'
- powershell: |
echo "##vso[task.setvariable variable=versionNumber;isOutput=true]$(nextRelease)"
name: setOutputVar
- script: |
npmVersionString=$(node -p "require('./package.json').version")
echo "##vso[build.updatebuildnumber]$npmVersionString"
displayName: 'set build number'