Skip to content
Snippets Groups Projects
Unverified Commit 1d54f1a4 authored by Ben Kochie's avatar Ben Kochie Committed by GitHub
Browse files

Merge pull request #212 from cloudalchemy/superq/publisher_image

Use cloudalchemy/publisher
parents 7b909b0b e99a1358
Branches
Tags
No related merge requests found
---
skip_list:
- '106'
- '204'
- '208'
- '106'
- '204'
- '208'
......@@ -5,6 +5,9 @@ executors:
python:
docker:
- image: cimg/python:3.9
publisher:
docker:
- image: quay.io/cloudalchemy/publisher:latest
jobs:
lint:
......@@ -42,48 +45,14 @@ jobs:
echo 'Not running latest on PR'
fi
release:
executor: python
executor: publisher
environment:
GIT_MAIL: cloudalchemybot@gmail.com
GIT_USER: cloudalchemybot
GIT_COMMIT_DESC: git log --format=%B -n 1 ${CIRCLE_SHA1}
PROJECT_USERNAME: $CIRCLE_PROJECT_USERNAME
PROJECT_REPONAME: $CIRCLE_PROJECT_REPONAME
steps:
- checkout
- setup_remote_docker
- run: pip install git-semver
- run: git config --global user.email "${GIT_MAIL}"
- run: git config --global user.name "${GIT_USER}"
- run: |
GIT_TAG=none
case "$(git log --format=oneline -n 1 $CIRCLE_SHA1)" in
*"[patch]"*|*"[fix]"*|*"[bugfix]"* ) GIT_TAG=$(git semver --next-patch) ;;
*"[minor]"*|*"[feat]"*|*"[feature]"* ) GIT_TAG=$(git semver --next-minor) ;;
*"[major]"*|*"[breaking change]"* ) GIT_TAG=$(git semver --next-major) ;;
*) echo "Keyword not detected. Doing nothing" && circleci-agent step halt ;;
esac
echo "GIT_TAG=${GIT_TAG}" >> $BASH_ENV
- run: |
docker run -it --rm \
-v "${CIRCLE_WORKING_DIRECTORY}:/role" \
-w "/role" \
ferrarimarco/github-changelog-generator:1.15.2 \
--user "${CIRCLE_PROJECT_USERNAME}" \
--project "${CIRCLE_PROJECT_REPONAME}" \
--token "${GH_TOKEN}" \
--release-url "https://galaxy.ansible.com/${CIRCLE_PROJECT_USERNAME}/${CIRCLE_PROJECT_REPONAME#ansible-}" \
--unreleased-label "**Next release**" --no-compare-link \
--future-release "${GIT_TAG}"
- run: git add CHANGELOG.md
- run: git commit -m "[ci skip] Automatic changelog update"
- run: git push "https://${GH_TOKEN}:@${GIT_URL}" || circleci-agent step halt
- run: |
ghr \
-t ${GH_TOKEN} \
-u ${CIRCLE_PROJECT_USERNAME} \
-r ${CIRCLE_PROJECT_REPONAME} \
-n ${GIT_TAG} \
-b "$(sed -n -e '/## \[0.22.0\]/,/## \[/ p' CHANGELOG.md | sed -e '$ d')" \
${GIT_TAG}
- run: create_release
galaxy:
executor: python
steps:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment