From fe0240ca8bd1dabce0a92ed33f556ba3c9f3a884 Mon Sep 17 00:00:00 2001 From: "Nhan Thai (dandoh)" Date: Wed, 29 Jul 2020 17:39:01 +0700 Subject: [PATCH] [ release ] bump v0.0.1 --- VERSION | 1 + wercker.yml | 70 +++++++++++++++++++++++++++++++++++++++++------------ 2 files changed, 55 insertions(+), 16 deletions(-) create mode 100644 VERSION diff --git a/VERSION b/VERSION new file mode 100644 index 00000000..8a9ecc2e --- /dev/null +++ b/VERSION @@ -0,0 +1 @@ +0.0.1 \ No newline at end of file diff --git a/wercker.yml b/wercker.yml index eab1ffd5..0823b4af 100644 --- a/wercker.yml +++ b/wercker.yml @@ -1,26 +1,64 @@ -# This references a standard debian container from the -# Docker Hub https://registry.hub.docker.com/_/debian/ -# Read more about containers on our dev center -# https://devcenter.wercker.com/overview-and-core-concepts/containers/ box: hashexpression/wercker - # You can also use services such as databases. Read more on our dev center: - # https://devcenter.wercker.com/administration/services/ - # services: - # - postgres - # https://devcenter.wercker.com/administration/services/examples/postgresql/ +no-response-timeout: 10 -# - mongo -# https://devcenter.wercker.com/administration/services/examples/mongodb/ - -# This is the build pipeline. Pipelines are the core of wercker -# Read more about pipelines on our dev center -# https://devcenter.wercker.com/development/pipelines/ build: # Steps make up the actions in your pipeline # Read more about steps on our dev center: # https://devcenter.wercker.com/development/steps/ steps: + - script: + name: restore cache + code: | + if [ -e "$WERCKER_CACHE_DIR/.stack-work" ]; then + cp -r $WERCKER_CACHE_DIR/.stack-work . + fi - script: name: build & test code: | - stack build --test --ghc-options -O2 + stack build --test --ghc-options -O2 --copy-bins --local-bin-path bins + - script: + name: store cache + code: | + cp -r .stack-work $WERCKER_CACHE_DIR + + +create-release: + box: ubuntu + steps: + - install-packages: + packages: curl file + - script: + name: Get release version + code: | + export RELEASE_VERSION=$(cat VERSION) + - script: + name: Create symphony archive + code: | + tar czf symphony-$RELEASE_VERSION.tar.gz --directory=bins symphony + - wercker/github-create-release@2.1.1: + token: $GITHUB_TOKEN + tag: v$RELEASE_VERSION + title: v$RELEASE_VERSION + - wercker/github-upload-asset@2.1.1: + token: $GITHUB_TOKEN + file: symphony-$RELEASE_VERSION.tar.gz + + +create-docker-image: + box: hashexpression/symphony_env + steps: + - script: + name: Remove unncessary directories & files + code: | + rm -rf .stack-work + rm -rf .git + - script: + name: Copy symphony to PATH + code: | + cp bins/symphony /usr/bin + - internal/docker-push: + username: $DOCKERHUB_USERNAME # Registry username + password: $DUCKERHUB_PASSWORD # Registry password + repository: hashexpression/symphony + +