forked from gdelmas/typedoc-plugin-sourcefile-url
-
Notifications
You must be signed in to change notification settings - Fork 2
/
azure-pipelines.yml
99 lines (82 loc) · 2.49 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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
# Node.js
# Build a general Node.js project with npm.
# Add steps that analyze code, save build artifacts, deploy, and more:
# https://docs.microsoft.com/azure/devops/pipelines/languages/javascript
trigger:
- master
pool:
vmImage: ubuntu-latest
steps:
- checkout: self
clean: true
persistCredentials: true
displayName: 'check out branch'
- task: DownloadSecureFile@1
inputs:
secureFile: 'github-user-options.json'
name: GitHubUserOptions
displayName: 'retrieve GitHub user options'
- task: oneLuckiDevJson2Variable@1
inputs:
jsonFile: '$(GitHubUserOptions.secureFilePath)'
shouldPrefixVariables: false
displayName: 'parse GitHub user options'
- task: NodeTool@0
inputs:
versionSpec: '14.x'
displayName: 'Install Node.js'
- script: |
npm install
displayName: 'npm install'
- script: |
git config --global user.email '$(gitUserEmail)'
git config --global user.name '$(gitUserName)'
npm version patch -m 'Bump version to %s [skip ci]'
displayName: 'npm bump version'
- script: |
npm install
displayName: 'npm build'
- script: |
git push origin HEAD:master
displayName: 'push bumped version to origin repo'
- task: oneLuckiDevJson2Variable@1
inputs:
jsonFile: '$(System.DefaultWorkingDirectory)/package.json'
shouldPrefixVariables: true
variablePrefix: 'packageJson'
- task: CopyFiles@2
inputs:
SourceFolder: '$(System.DefaultWorkingDirectory)'
Contents: |
package.json
**.md
TargetFolder: '$(System.DefaultWorkingDirectory)/dist'
OverWrite: true
displayName: 'copy static files to output directory'
- task: CopyFiles@2
inputs:
SourceFolder: '$(System.DefaultWorkingDirectory)/dist'
Contents: '**'
TargetFolder: '$(Build.ArtifactStagingDirectory)'
OverWrite: true
displayName: 'deploy output directory contents to artifact stage'
- task: GitHubRelease@1
inputs:
gitHubConnection: 'github.com_shuebner20'
repositoryName: '$(Build.Repository.Name)'
action: 'create'
target: '$(Build.SourceVersion)'
tagSource: 'userSpecifiedTag'
tag: '$(packageJsonversion)'
releaseNotesSource: 'inline'
isDraft: true
changeLogCompareToRelease: 'lastFullRelease'
changeLogType: 'commitBased'
displayName: 'create release at GitHub'
- task: Npm@1
inputs:
command: 'publish'
workingDir: '$(System.DefaultWorkingDirectory)/dist'
publishRegistry: 'useFeed'
publishFeed: '2ecdc2b4-96cd-42e2-b46d-52fd45177053/56115eca-361e-4c4a-a490-94c430a57cb7'
enabled: false