Skip to content

Commit 9bd0a03

Browse files
committed
ci: skip release on non-tagged build
1 parent 5fcf089 commit 9bd0a03

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

.circleci/config.yml

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,13 @@ deploy: &deploy
4040
- run:
4141
name: 'Deploy to Github Release'
4242
command: |
43-
export GIT_TAG="$(git describe --tags $(git rev-list --tags --max-count=1))"; \
44-
ghr -u "${CIRCLE_PROJECT_USERNAME}" -r "${CIRCLE_PROJECT_REPONAME}" "${GIT_TAG}" build/lib/py_sourcemap/*.so
43+
if git log -1 --pretty=%B | grep "^[0-9]\+\.[0-9]\+\.[0-9]\+$";
44+
then
45+
export GIT_TAG="$(git describe --tags $(git rev-list --tags --max-count=1))"; \
46+
ghr -u "${CIRCLE_PROJECT_USERNAME}" -r "${CIRCLE_PROJECT_REPONAME}" "${GIT_TAG}" build/lib/py_sourcemap/*.so
47+
else
48+
echo "Not a release, skipping publish"
49+
fi
4550
4651
version: 2
4752
jobs:
@@ -98,7 +103,13 @@ jobs:
98103
- checkout
99104
- run:
100105
name: 'Deploy to Github Release'
101-
command: pip install -r requirement-dev.txt && make release
106+
command: |
107+
if git log -1 --pretty=%B | grep "^[0-9]\+\.[0-9]\+\.[0-9]\+$";
108+
then
109+
pip install -r requirement-dev.txt && make release
110+
else
111+
echo "Not a release, skipping publish"
112+
fi
102113
103114
nightly:
104115
machine: true

0 commit comments

Comments
 (0)