forked from baloise/gitopscli
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.releaserc.yml
35 lines (35 loc) · 1.55 KB
/
.releaserc.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
branch: master
preset: conventionalcommits # https://www.conventionalcommits.org/
tagFormat: "v${version}"
plugins:
- "@semantic-release/commit-analyzer"
- "@semantic-release/release-notes-generator"
- - "semantic-release-replace-plugin"
- replacements:
- files: [ "pyproject.toml" ]
from: "version=\"0.0.0\""
to: "version=\"${nextRelease.version}\""
countMatches: true
results:
- file: "pyproject.toml"
hasChanged: true
numMatches: 1
numReplacements: 1
- - "@semantic-release/exec"
- verifyConditionsCmd: echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
verifyReleaseCmd: |
MAJOR_MINOR_PATCH=${/^((\d+)\.\d+)\.\d+$/.exec(nextRelease.version)}
if [ -z $MAJOR_MINOR_PATCH ]; then echo "Only SemVer versions with version core (major.minor.patch) supported!"; exit 1; fi
prepareCmd: docker build -t $DOCKER_IMAGE:latest .
publishCmd: |
MAJOR_MINOR_PATCH=${/^((\d+)\.\d+)\.\d+$/.exec(nextRelease.version)[0]}
MAJOR_MINOR=${ /^((\d+)\.\d+)\.\d+$/.exec(nextRelease.version)[1]}
MAJOR=${ /^((\d+)\.\d+)\.\d+$/.exec(nextRelease.version)[2]}
docker tag $DOCKER_IMAGE:latest $DOCKER_IMAGE:$MAJOR_MINOR_PATCH
docker tag $DOCKER_IMAGE:latest $DOCKER_IMAGE:$MAJOR_MINOR
docker tag $DOCKER_IMAGE:latest $DOCKER_IMAGE:$MAJOR
docker push $DOCKER_IMAGE:latest
docker push $DOCKER_IMAGE:$MAJOR_MINOR_PATCH
docker push $DOCKER_IMAGE:$MAJOR_MINOR
docker push $DOCKER_IMAGE:$MAJOR
- "@semantic-release/github"