-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
56 lines (47 loc) · 1.71 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
# Node.js
# Build a general Node.js application with npm.
# Add steps that analyze code, save build artifacts, deploy, and more:
# https://docs.microsoft.com/vsts/pipelines/languages/javascript
jobs:
- job: Linux
pool:
vmImage: 'Ubuntu 16.04'
steps:
- task: NodeTool@0
inputs:
versionSpec: '8.x'
displayName: 'Install Node.js'
- script: npm install
displayName: 'Install dependencies'
- script: npm test
displayName: 'Run tests'
- task: PublishTestResults@2
displayName: 'Save test results'
condition: succeededOrFailed()
inputs:
testResultsFormat: JUnit
testResultsFiles: '$(System.DefaultWorkingDirectory)/junit/*.xml'
- task: PublishCodeCoverageResults@1
displayName: 'Save code coverage'
condition: succeededOrFailed()
inputs:
codeCoverageTool: Cobertura
summaryFileLocation: '$(System.DefaultWorkingDirectory)/coverage/cobertura-coverage.xml'
reportDirectory: '$(System.DefaultWorkingDirectory)/coverage/lcov-report'
- script: npm pack
displayName: 'Prepare installable tarball'
condition: succeededOrFailed()
- task: PublishBuildArtifacts@1
displayName: 'Save npm-tarball.tgz'
condition: succeededOrFailed()
inputs:
artifactName: 'npm-tarball.tgz'
PathtoPublish: '$(System.DefaultWorkingDirectory)/isomorphic-git-kbpgp-plugin-0.0.0-development.tgz'
- script: npm run semantic-release
displayName: 'Publish to npm'
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master'))
env:
GITHUB_TOKEN: $(GITHUB_TOKEN)
NPM_TOKEN: $(Npm.Token)
TWITTER_ACCESS_TOKEN_SECRET: $(TWITTER_ACCESS_TOKEN_SECRET)
TWITTER_CONSUMER_SECRET: $(TWITTER_CONSUMER_SECRET)