RHINENG-1638: fix flaky unit tests #428
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Semantic release | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: increment version, commit, push | |
run: | | |
DOC_FILE="docs/v3/openapi.json docs/admin/openapi.json" | |
CLOWDER_FILE=deploy/clowdapp.yaml | |
VERSION=$(cat VERSION) | |
RELEASE_TYPE=$(git log -1 | tail -n1) # Check release type (/major, /minor, /patch (default)) | |
VERSION_NEXT=$(./scripts/increment_version.sh $VERSION $RELEASE_TYPE) | |
sed -i 's|\("version": "\)[^"]*\("\)$|'"\1$VERSION_NEXT\2|;" $DOC_FILE | |
sed -i -E "s/\{name: IMAGE_TAG_(MANAGER|LISTENER|EVALUATOR_UPLOAD|EVALUATOR_RECALC|JOBS|DATABASE_ADMIN|ADMIN), value: .*\}/{name: IMAGE_TAG_\1, value: $VERSION_NEXT}/" $CLOWDER_FILE | |
echo $VERSION_NEXT >VERSION | |
git config --global user.name 'semantic-release' | |
git config --global user.email '' | |
git commit -am "${VERSION_NEXT}" | |
git push | |
git tag ${VERSION_NEXT} | |
git push origin ${VERSION_NEXT} |