Skip to content
This repository was archived by the owner on Mar 6, 2023. It is now read-only.

Commit 1a8d1e8

Browse files
authored
Merge pull request #354 from cloudalchemy/superq/update_ci
Update circleci config
2 parents 013bedd + 1a42259 commit 1a8d1e8

File tree

1 file changed

+9
-50
lines changed

1 file changed

+9
-50
lines changed

.circleci/config.yml

Lines changed: 9 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ executors:
55
python:
66
docker:
77
- image: cimg/python:3.9
8+
publisher:
9+
docker:
10+
- image: quay.io/cloudalchemy/publisher:latest
811

912
jobs:
1013
lint:
@@ -42,58 +45,14 @@ jobs:
4245
echo 'Not running latest on PR'
4346
fi
4447
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
5449
steps:
5550
- 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+
9756
galaxy:
9857
executor: python
9958
steps:

0 commit comments

Comments
 (0)