From 59531ac8c5a2dad42ec912dbc7e1558df4f8d363 Mon Sep 17 00:00:00 2001 From: Samir Talwar Date: Mon, 22 Apr 2019 11:54:35 +0100 Subject: [PATCH] Deploy a draft release when pushing a tag. --- .travis.yml | 17 +++++++++++++++++ appveyor.yml | 23 ++++++++++++++++++++--- 2 files changed, 37 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 650522a..3fb1fb7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -36,3 +36,20 @@ script: if [[ "$TRAVIS_OS_NAME" == 'linux' ]]; then make lint fi + +before_deploy: + - make out/build/release/smoke + - mkdir -p out/publish + - cp out/build/release/smoke "out/publish/smoke-${TRAVIS_TAG}-$(uname -s)-$(uname -m)" + +deploy: + provider: releases + draft: true + file_glob: true + file: out/publish/* + overwrite: true + skip_cleanup: true + on: + tags: true + api_key: + secure: "dt3YESE3S86tqhWu0J8HxTTsTewcj6S3o//P9hwlFAcPUsqzlZLL9KmySnYvNQ91TuBpUu2blXVRY+CFPU59MEIXtSI4ZSHWEd9vetMdW7GcoN8HYNQapL0jEvIx1D2495jCWr6gEHERFUr6eJgI0ZasmlIPSPL5H3vFS2SxGRs=" diff --git a/appveyor.yml b/appveyor.yml index 36e69e1..2670f40 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,10 +1,10 @@ -build: off - cache: - '%LOCALAPPDATA%\Programs\stack' - '%APPDATA%\stack' - .stack-work +build: off + before_build: - curl -o stack.zip -L --insecure https://www.stackage.org/stack/windows-x86_64 - 7z x stack.zip stack.exe @@ -12,7 +12,24 @@ before_build: build_script: - stack --no-terminal build - - stack --no-terminal install --local-bin-path=out\build + - stack --no-terminal install --local-bin-path=.\out\build + - md .\out\publish + - if /i %APPVEYOR_REPO_TAG% equ true copy .\out\build\smoke.exe .\out\publish\smoke-%APPVEYOR_REPO_TAG_NAME%-windows-x64.exe test_script: - '.\out\build\smoke --command=.\out\build\smoke test' + +artifacts: + - name: published + path: out\publish\smoke-$(APPVEYOR_REPO_TAG_NAME)-windows-x64.exe + +deploy: + provider: GitHub + draft: true + description: "Smoke $(APPVEYOR_REPO_TAG_NAME)" + artifact: out\publish\smoke-$(APPVEYOR_REPO_TAG_NAME)-windows-x64.exe + force_update: true + auth_token: + secure: "QfL5WkDKhP5KNpeXpEgYGzLz65B7/hcVuhwwyRFul/rGEKYszbAVQ/vmFWtWVVcX" + on: + APPVEYOR_REPO_TAG: true