This repository has been archived by the owner on Jul 25, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathazure-pipelines.yml
53 lines (53 loc) · 1.59 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
trigger:
- master
stages:
- stage: Build
jobs:
- job: Build
pool:
vmImage: ubuntu-latest
steps:
- script: |
npm ci
npm run build
- upload: dist
artifact: dist
- stage: Release
condition: 'and(succeeded(), eq(variables[''Build.SourceBranch''], ''refs/heads/master''))'
jobs:
- job: Metadata
pool:
vmImage: ubuntu-latest
steps:
- task: LoadJsonVariables@1
inputs:
JsonSource: ./package.json
VariablePrefix: pkg
- script: >-
echo '##vso[task.setvariable
variable=version;isOutput=true]$(pkg_version)'
name: setVersion
- deployment: GitHub_Release_Draft
pool:
vmImage: ubuntu-latest
dependsOn: Metadata
environment: github
variables:
version: '$[ dependencies.Metadata.outputs[''setVersion.version''] ]'
strategy:
runOnce:
deploy:
steps:
- download: current
artifact: dist
- task: GitHubRelease@0
inputs:
gitHubConnection: decsys-pipelines
repositoryName: decsys/freetext-component
action: create
tagSource: manual
tag: $(version)
releaseNotesSource: input
releaseNotes: '`// TODO`'
isDraft: true
assets: $(Pipeline.Workspace)/dist/*.js