diff --git a/.circleci/config.yml b/.circleci/config.yml index f79a9ea7..aade34aa 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -80,6 +80,16 @@ jobs: command: twine upload dist/* working_directory: /home/mythril + dockerhub_deploy: + docker: + - image: docker:stable + steps: + - checkout + - setup_remote_docker + - run: + name: Building Docker Image + command: ./docker_build_and_deploy.sh + workflows: version: 2 build: @@ -96,3 +106,12 @@ workflows: only: /v[0-9]+(\.[0-9]+)*/ requires: - test + - dockerhub_release: + filters: + branches: + ignore: /.*/ + tags: + only: /v[0-9]+(\.[0-9]+)*/ + requires: + - test + - deploy diff --git a/docker_build_and_deploy.sh b/docker_build_and_deploy.sh new file mode 100755 index 00000000..948397b9 --- /dev/null +++ b/docker_build_and_deploy.sh @@ -0,0 +1,6 @@ +#!/bin/sh + +VERSION=${CIRCLE_TAG#?} +docker build -t mythril/mythril:${VERSION} . +docker login -u $DOCKERHUB_USERNAME -p $DOCKERHUB_PASSWORD +docker push mythril/mythril:${VERSION} diff --git a/setup.py b/setup.py index f2b02810..b01f99b7 100755 --- a/setup.py +++ b/setup.py @@ -6,7 +6,7 @@ import os # Package version (vX.Y.Z). It must match git tag being used for CircleCI # deployment; otherwise the build will failed. -VERSION = "v0.18.0" +VERSION = "v0.18.1" class VerifyVersionCommand(install):