diff --git a/appveyor.yml b/appveyor.yml
index a3e1c7085e8249d8795646c6bf2c2ac833bb8f40..cf8587174bf807bc599d798ad038384bea40eb02 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -26,7 +26,7 @@ environment:
     CMAKE_C_COMPILER: C:/mingw-w64/i686-6.3.0-posix-dwarf-rt_v5-rev1/mingw32/bin/gcc.exe
     CMAKE_CXX_COMPILER: C:/mingw-w64/i686-6.3.0-posix-dwarf-rt_v5-rev1/mingw32/bin/g++.exe
     BINTRAY_API_KEY:
-      secure: rIlpnd+V2lGd4D3H8UniaVHhzX0qmJQx4AhaKgd6pD9iFURsxu8IiM8dAWElSalo
+      secure: +HBoI2BoaYmmPEIu4cfTvqIlRKe5urKleCc5mg7b7Y642+eZbq4fDzrOG9hGjJ6U
   - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2013
     COMPILER: mingw
     TOOLSET: w64-mingw32
@@ -36,7 +36,7 @@ environment:
     CMAKE_C_COMPILER: C:/mingw-w64/x86_64-6.3.0-posix-seh-rt_v5-rev1/mingw64/bin/gcc.exe
     CMAKE_CXX_COMPILER: C:/mingw-w64/x86_64-6.3.0-posix-seh-rt_v5-rev1/mingw64/bin/g++.exe
     BINTRAY_API_KEY:
-      secure: rIlpnd+V2lGd4D3H8UniaVHhzX0qmJQx4AhaKgd6pD9iFURsxu8IiM8dAWElSalo
+      secure: +HBoI2BoaYmmPEIu4cfTvqIlRKe5urKleCc5mg7b7Y642+eZbq4fDzrOG9hGjJ6U
   - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
     COMPILER: msvc
     MINGW_DIR_BIN: ''
@@ -44,7 +44,7 @@ environment:
     ARCH: win32
     GENERATOR: '"Visual Studio 15 2017"'
     BINTRAY_API_KEY:
-      secure: rIlpnd+V2lGd4D3H8UniaVHhzX0qmJQx4AhaKgd6pD9iFURsxu8IiM8dAWElSalo
+      secure: +HBoI2BoaYmmPEIu4cfTvqIlRKe5urKleCc5mg7b7Y642+eZbq4fDzrOG9hGjJ6U
   - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
     COMPILER: msvc
     MINGW_DIR_BIN: ''
@@ -52,7 +52,7 @@ environment:
     ARCH: win64
     GENERATOR: '"Visual Studio 15 2017 Win64"'
     BINTRAY_API_KEY:
-      secure: rIlpnd+V2lGd4D3H8UniaVHhzX0qmJQx4AhaKgd6pD9iFURsxu8IiM8dAWElSalo
+      secure: +HBoI2BoaYmmPEIu4cfTvqIlRKe5urKleCc5mg7b7Y642+eZbq4fDzrOG9hGjJ6U
 
 #---------------------------------#
 #            steps                #
@@ -73,9 +73,6 @@ build_script:
 - cmd: if [%COMPILER%]==[mingw] (cd build-release & cmake --build . --target install || exit 1 & cd ..)
 - cmd: if [%COMPILER%]==[msvc] (cd build & cmake --build . --target INSTALL --config Debug || exit 1 & cd ..)
 - cmd: if [%COMPILER%]==[msvc] (cd build & cmake --build . --target INSTALL --config MinSizeRel || exit 1 & cd ..)
-- ps: $env:GITHUB_REPO_TAG = git describe
-- cmd: 7z.exe a rew-%GITHUB_REPO_TAG%-%ARCH%-%TOOLSET%.zip .\install\*
-- cmd: .\publish.bat rew-%GITHUB_REPO_TAG%-%ARCH%-%TOOLSET%.zip %GITHUB_REPO_TAG% 
 
 test_script:
 - cmd: if [%COMPILER%]==[mingw] (cd build-debug & ctest --verbose --output-on-failure || exit 1 & cd ..)
@@ -83,6 +80,11 @@ test_script:
 - cmd: if [%COMPILER%]==[msvc] (cd build & ctest --verbose --output-on-failure -C "Debug" || exit 1 & cd ..)
 - cmd: if [%COMPILER%]==[msvc] (cd build & ctest --verbose --output-on-failure -C "MinSizeRel" || exit 1 & cd ..)
 
+deploy_script:
+- ps: $env:GITHUB_REPO_TAG = git describe
+- cmd: 7z.exe a rew-%GITHUB_REPO_TAG%-%ARCH%-%TOOLSET%.zip .\install\*
+- cmd: .\publish.bat rew-%GITHUB_REPO_TAG%-%ARCH%-%TOOLSET%.zip %GITHUB_REPO_TAG% 
+
 #---------------------------------#
 #         notifications           #
 #---------------------------------#
diff --git a/publish.bat b/publish.bat
index 0ea9b4df0b31e087cf259d761891ef14559a7002..204da2537c5ce393c5ac6bb600857d45a40c4194 100644
--- a/publish.bat
+++ b/publish.bat
@@ -1,4 +1,4 @@
 echo off
 echo "Publishing %1 as version %2"
-curl -T %1 -v -umatusnov:%BINTRAY_API_KEY% https://api.bintray.com/content/matusnov/radio-enabled-web/release/%2/
+curl --fail -T %1 -umatusnov:%BINTRAY_API_KEY% https://api.bintray.com/content/matusnov/radio-enabled-web/release/%2/
 exit 0
diff --git a/publish.sh b/publish.sh
index b7086abb6496f0623e35e3e4358d7e4403d4f187..0116fb752729f7df955adc350e2b97dcd819dfd5 100644
--- a/publish.sh
+++ b/publish.sh
@@ -1,2 +1,2 @@
 echo "Publishing $1 as version $2"
-curl -T $1 -v -umatusnov:%BINTRAY_API_KEY% https://api.bintray.com/content/matusnov/radio-enabled-web/release/$2/
+curl --fail -T $1 -umatusnov:$BINTRAY_API_KEY https://api.bintray.com/content/matusnov/radio-enabled-web/release/$2/