From 61c4d434e25a5b342770d9c013545e79d900a20d Mon Sep 17 00:00:00 2001
From: Benedek Racz <betontalpfa@gmail.com>
Date: Sun, 23 Feb 2020 12:26:13 +0100
Subject: [PATCH] [REF] refactor appveyor deployment

---
 appveyor.yml | 17 +++++++++++++----
 1 file changed, 13 insertions(+), 4 deletions(-)

diff --git a/appveyor.yml b/appveyor.yml
index 16144bb..6c3f72f 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -27,8 +27,15 @@ environment:
     COVERAGE_FILENAME: py37-legacy_wexpect_coverage.xml
     PYTHON: "C:\\Python37"
 
-build: off
+build: on
 
+build_script:
+  # Create source distribution.
+  - cmd: |
+      "%PYTHON%/python.exe" -m pip install --upgrade pip
+      "%PYTHON%/python.exe" -m pip install --upgrade setuptools wheel
+      "%PYTHON%/python.exe" -m setup sdist
+ 
 install:
   - set PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%
   - pip install .[test]
@@ -55,9 +62,11 @@ after_test:
   - cmd: "echo username: __token__ >> %USERPROFILE%\\.pypirc" 
   - cmd: "echo password: %testpypipw% >> %USERPROFILE%\\.pypirc" 
 
-  # Create source distribution.
-  - python -m setup sdist
-
+artifacts:
+  - path: dist\\wexpect*.tar.gz
+    name: wexpect-source-distro
+  
+deploy_script:
   # Upload to pypi.
   # More precisely. The master and release builds will be uploaded to pypi. Test branch will be
   # uploaded to test-pypi the test builds.