@@ -46,37 +46,43 @@ jobs:
46
46
environment :
47
47
48
48
GIT_USER : cloudalchemybot
49
- GIT_COMMIT_DESC : git log --format=%B -n 1 ${CIRCLE_SHA1}
49
+ GIT_CHGLOG_URL : https://github.com/git-chglog/git-chglog/releases/download/v0.14.0/git-chglog_0.14.0_linux_amd64.tar.gz
50
+ GIT_CHGLOG_SUM : ed65b1c1dad41ca0372ebc86cf4102cdbb3397259461f1c3730c4c61075a618a
50
51
steps :
51
52
- checkout
52
- - setup_remote_docker
53
53
- run : pip install git-semver
54
54
- run : git config --global user.email "${GIT_MAIL}"
55
55
- run : git config --global user.name "${GIT_USER}"
56
56
- run : ./bump_version.sh >> $BASH_ENV
57
- - run : |
58
- if [[ "${NEW_TAG}" == 'none' ]]; then
59
- echo "Keyword not detected. Doing nothing" && circleci-agent step halt
60
- else
61
- echo "Bumping to ${NEW_TAG}"
62
- fi
63
- - run : |
64
- echo "Running in ${PWD}" && docker run --rm \
65
- -v "${PWD}:/workdir" \
66
- quay.io/git-chglog/git-chglog:latest \
67
- --output CHANGELOG.md \
68
- --next-tag "${NEW_TAG}"
57
+ - run :
58
+ name : Checking for new tag
59
+ command : |
60
+ if [[ "${NEW_TAG}" == 'none' ]]; then
61
+ echo "Keyword not detected. Doing nothing" && circleci-agent step halt
62
+ else
63
+ echo "Bumping to ${NEW_TAG}"
64
+ fi
65
+ - run :
66
+ name : Downloading git-chglog
67
+ command : |
68
+ curl -sL --fail "${GIT_CHGLOG_URL}" -o 'git-chglog.tar.gz' && \
69
+ sha256sum -c <(echo "${GIT_CHGLOG_SUM} git-chglog.tar.gz") && \
70
+ tar -zvxf git-chglog.tar.gz git-chglog && \
71
+ chhmod 755 git-chglog
72
+ - run : ./git-chglog --output CHANGELOG.md --next-tag "${NEW_TAG}"
69
73
- run : git add CHANGELOG.md
70
74
- run : git commit -m "[ci skip] Automatic changelog update"
71
75
- run : git push "https://${GH_TOKEN}:@${GIT_URL}" || circleci-agent step halt
72
- - run : |
73
- ghr \
74
- -t ${GH_TOKEN} \
75
- -u ${CIRCLE_PROJECT_USERNAME} \
76
- -r ${CIRCLE_PROJECT_REPONAME} \
77
- -n ${NEW_TAG} \
78
- -b "$(sed -n -e '/## \[0.22.0\]/,/## \[/ p' CHANGELOG.md | sed -e '$ d')" \
79
- ${NEW_TAG}
76
+ - run :
77
+ name : Publishing release
78
+ command : |
79
+ ghr \
80
+ -t ${GH_TOKEN} \
81
+ -u ${CIRCLE_PROJECT_USERNAME} \
82
+ -r ${CIRCLE_PROJECT_REPONAME} \
83
+ -n ${NEW_TAG} \
84
+ -b "$(sed -n -e '/## \[0.22.0\]/,/## \[/ p' CHANGELOG.md | sed -e '$ d')" \
85
+ ${NEW_TAG}
80
86
galaxy :
81
87
executor : python
82
88
steps :
0 commit comments