From 7675888a8369907724e0b185f22bf89111c62e63 Mon Sep 17 00:00:00 2001 From: Ruslan Kuprieiev Date: Mon, 20 May 2019 02:21:35 +0300 Subject: [PATCH] appveyor: deploy to pypi Signed-off-by: Ruslan Kuprieiev --- .appveyor.yml | 13 ++++++++++++- scripts/build_windows.cmd | 2 +- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index 32f73ab60..544874ed0 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -23,6 +23,10 @@ environment: OSS_ENDPOINT: localhost:50004 OSS_ACCESS_KEY_ID: AccessKeyID OSS_ACCESS_KEY_SECRET: AccessKeySecret + TWINE_USERNAME: + secure: EAZ5orh6F5xpdHFPMY7qMQ== + TWINE_PASSWORD: + secure: puvABn5L2hnP5MKwv3JCbfcg6/7eL7wmJ5ZbFOGxPNE= matrix: @@ -70,6 +74,9 @@ test_script: after_test: - if "%APPVEYOR_PULL_REQUEST_NUMBER%"=="" pip install codecov - if "%APPVEYOR_PULL_REQUEST_NUMBER%"=="" codecov + +before_deploy: + - if "%APPVEYOR_REPO_TAG%"=="true" python setup.py sdist bdist_wheel --universal - if "%APPVEYOR_REPO_TAG%"=="true" python -m dvc pull - if "%APPVEYOR_REPO_TAG%"=="true" .\scripts\build_windows.cmd @@ -81,9 +88,13 @@ artifacts: - path: dvc*.exe name: DVC Installer +deploy_script: + - if "%APPVEYOR_REPO_TAG%"=="true" pip install twine + - if "%APPVEYOR_REPO_TAG%"=="true" twine upload dist/* + deploy: provider: GitHub auth_token: secure: 25c1pNoXWbtTwUkKLcThwcl2A2xG8oXHsPuD73HVbQ7SRy9X6HzkCc2sXzhpfRtF on: - appveyor_repo_tag: true + APPVEYOR_REPO_TAG: true diff --git a/scripts/build_windows.cmd b/scripts/build_windows.cmd index 7c38380df..cac3f9511 100644 --- a/scripts/build_windows.cmd +++ b/scripts/build_windows.cmd @@ -5,7 +5,7 @@ echo ====== Starting to build dvc installer for Windows... ====== if not exist dvc\NUL (echo Error: Please run this script from repository root && goto :error) rmdir /Q /S build -rmdir /Q /S dist +del /Q /S "dist\*.ps1" del /Q /S dvc.spec del /Q /S "dvc-*.exe"