From 99e67fdde460eab04aab5a5b527072df934ac0ec Mon Sep 17 00:00:00 2001 From: "Jens H. Nielsen" Date: Fri, 18 Oct 2019 11:49:33 +0200 Subject: [PATCH 1/3] Auth for release to pypi --- azure-pipelines.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 5b63931cc..d96924d1e 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -57,6 +57,7 @@ jobs: pip install -r test_requirements.txt pip install -r docs_requirements.txt pip install -e . + pip install twine displayName: "Install environment, qcodes" - bash: | source activate qcodes @@ -122,3 +123,17 @@ jobs: git push displayName: "Publish docs to gh-pages" condition: and(succeeded(), eq( variables['Agent.OS'], 'Linux' ), eq(variables['Build.SourceBranch'], 'refs/heads/master'), eq(variables['Build.Reason'], 'IndividualCI')) + - task: TwineAuthenticate@1 + inputs: + pythonUploadServiceConnection: qcodes_contrib_drivers_release + - script: | + source activate qcodes + python setup.py bdist_wheel + python setup.py sdist + condition: and(succeeded(), eq( variables['Agent.OS'], 'Linux' )) + displayName: "Build dist artifacts" + - script: | + source activate qcodes + twine upload -r "qcodes_contrib_drivers_release" --config-file $(PYPIRC_PATH) dist/* + condition: and(succeeded(), eq( variables['Agent.OS'], 'Linux' ), contains(variables['Build.SourceBranch'], 'refs/tags/')) + displayName: "Upload tagged release to PyPi" From 7f2995240df9d8477ba1c42babe1b7295365f584 Mon Sep 17 00:00:00 2001 From: "Jens H. Nielsen" Date: Fri, 18 Oct 2019 11:58:33 +0200 Subject: [PATCH 2/3] fix syntax --- azure-pipelines.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index d96924d1e..fa983ffd9 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -130,8 +130,8 @@ jobs: source activate qcodes python setup.py bdist_wheel python setup.py sdist - condition: and(succeeded(), eq( variables['Agent.OS'], 'Linux' )) - displayName: "Build dist artifacts" + condition: and(succeeded(), eq( variables['Agent.OS'], 'Linux' )) + displayName: "Build dist artifacts" - script: | source activate qcodes twine upload -r "qcodes_contrib_drivers_release" --config-file $(PYPIRC_PATH) dist/* From bbcec698502ccf64e6176b91d68ca1124d435bc9 Mon Sep 17 00:00:00 2001 From: "Jens H. Nielsen" Date: Fri, 18 Oct 2019 12:05:20 +0200 Subject: [PATCH 3/3] Run on tags --- azure-pipelines.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index fa983ffd9..30514db9d 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -13,6 +13,9 @@ trigger: branches: include: - master + tags: + include: + - 'v*' jobs: - job: "run_the_tests"