@@ -5,6 +5,9 @@ executors:
5
5
python :
6
6
docker :
7
7
- image : cimg/python:3.9
8
+ publisher :
9
+ docker :
10
+ - image : quay.io/cloudalchemy/publisher:latest
8
11
9
12
jobs :
10
13
lint :
@@ -42,58 +45,14 @@ jobs:
42
45
echo 'Not running latest on PR'
43
46
fi
44
47
release :
45
- executor : python
46
- environment :
47
-
48
- GIT_USER : cloudalchemybot
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
51
- GHR_URL : https://github.com/tcnksm/ghr/releases/download/v0.13.0/ghr_v0.13.0_linux_amd64.tar.gz
52
- GHR_SUM : c428627270ae26e206cb526cb8c7bdfba475dd278f6691ddaf863355adadfa13
53
- GHR_FILE : ghr_v0.13.0_linux_amd64/ghr
48
+ executor : publisher
54
49
steps :
55
50
- checkout
56
- - run : pip install git-semver
57
- - run : git config --global user.email "${GIT_MAIL}"
58
- - run : git config --global user.name "${GIT_USER}"
59
- - run : ./bump_version.sh >> $BASH_ENV
60
- - run :
61
- name : Checking for new tag
62
- command : |
63
- if [[ "${NEW_TAG}" == 'none' ]]; then
64
- echo "Keyword not detected. Doing nothing" && circleci-agent step halt
65
- else
66
- echo "Bumping to ${NEW_TAG}"
67
- fi
68
- - run :
69
- name : Downloading git-chglog
70
- command : |
71
- curl -sL --fail "${GIT_CHGLOG_URL}" -o 'git-chglog.tar.gz' && \
72
- sha256sum -c <(echo "${GIT_CHGLOG_SUM} git-chglog.tar.gz") && \
73
- tar -zvxf git-chglog.tar.gz git-chglog && \
74
- chmod 755 git-chglog
75
- - run :
76
- name : Downloading ghr
77
- command : |
78
- curl -sL --fail "${GHR_URL}" -o 'ghr.tar.gz' && \
79
- sha256sum -c <(echo "${GHR_SUM} ghr.tar.gz") && \
80
- tar --strip-components 1 -zvxf ghr.tar.gz "${GHR_FILE}" && \
81
- chmod 755 ghr
82
- - run : ./git-chglog --output CHANGELOG.md --next-tag "${NEW_TAG}"
83
- - run : git --no-pager diff
84
- - run : git add CHANGELOG.md
85
- - run : git commit -m "[ci skip] Automatic changelog update"
86
- - run : git push "https://${GH_TOKEN}:@github.com/${CIRCLE_PROJECT_USERNAME}/${CIRCLE_PROJECT_REPONAME}.git" || circleci-agent step halt
87
- - run :
88
- name : Publishing release
89
- command : |
90
- ./ghr \
91
- -t ${GH_TOKEN} \
92
- -u ${CIRCLE_PROJECT_USERNAME} \
93
- -r ${CIRCLE_PROJECT_REPONAME} \
94
- -n ${NEW_TAG} \
95
- -b "$(sed -n -e '/## \[0.22.0\]/,/## \[/ p' CHANGELOG.md | sed -e '$ d')" \
96
- ${NEW_TAG}
51
+ - run : |
52
+ PROJECT_USERNAME="${CIRCLE_PROJECT_USERNAME}" \
53
+ PROJECT_REPONAME="${CIRCLE_PROJECT_REPONAME}" \
54
+ create_release
55
+
97
56
galaxy :
98
57
executor : python
99
58
steps :
0 commit comments