-
Notifications
You must be signed in to change notification settings - Fork 1
/
azure-pipelines.yml
55 lines (47 loc) · 1.23 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
pool:
vmImage: ubuntu-latest
jobs:
- job: build
displayName: Build
steps:
- task: NodeTool@0
inputs:
versionSpec: 14.x
displayName: Install Node.js
- script: |
npm ci
displayName: Install Packages
- script: |
npm run test --ci
displayName: Run Tests
- task: PublishTestResults@2
displayName: Publish Test Results
inputs:
testResultsFormat: JUnit
testResultsFiles: '**/test_results.xml'
testRunTitle: Jest Tests
- job: release
displayName: Release
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master'))
dependsOn: build
steps:
- task: NodeTool@0
inputs:
versionSpec: 14.x
displayName: Install Node.js
- script: |
git remote set-url origin https://$GH_USERNAME:[email protected]/johnnyhuy/ggsmark.git
git config --global user.email $GH_EMAIL
git config --global user.name $GH_USERNAME
git checkout master
npm config set '//registry.npmjs.org/:_authToken' "${NPM_TOKEN}"
npm ci
npm run release
displayName: Node Packages
env:
GH_USERNAME: $(GH.Username)
GH_EMAIL: $(GH.Email)
GH_TOKEN: $(GH.Token)
NPM_TOKEN: $(NPM.Token)