-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrelease.config.js
41 lines (38 loc) · 1.36 KB
/
release.config.js
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
module.exports={
plugins: [
["@semantic-release/commit-analyzer", {
releaseRules: [
{"type": "major" , "release": "major"},
{"type": "release", "release": "major"},
],
parserOpts: {
"noteKeywords": ["BREAKING CHANGE", "BREAKING CHANGES", "BREAKING"]
}
}],
["@semantic-release/exec",{
prepareCmd: `
set -e
CR=unicominternal.azurecr.io
VER=\${nextRelease.version}
##vso[build.updatebuildnumber]\${nextRelease.version}
docker login $CR -u $DOCKER_HUB_USER -p $DOCKER_HUB_PASSWORD
docker build -f ci/Dockerfile.Api -t $CR/unicom.monitor.api:$VER $STAGING_PATH
docker push $CR/unicom.monitor.api:$VER
`,
successCmd: `
set -e
TYPE=\${nextRelease.type}
echo release type is $TYPE
##vso[task.setvariable variable=newVer;]yes
##vso[build.addbuildtag]release
##vso[build.addbuildtag]\${nextRelease.type}
##vso[build.addbuildtag]\${nextRelease.version}
echo -n '##';echo "vso[build.addbuildtag]$BUILD_SOURCEBRANCHNAME"
`,
}],
"@semantic-release/git"
],
branches: [
'master'
],
}