Skip to content

Commit

Permalink
Merge pull request #22 from QCoDeS/azure_pypi_upload
Browse files Browse the repository at this point in the history
Auth for release to pypi
  • Loading branch information
jenshnielsen authored Oct 18, 2019
2 parents dec6521 + bbcec69 commit 59d6e6e
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ trigger:
branches:
include:
- master
tags:
include:
- 'v*'

jobs:
- job: "run_the_tests"
Expand Down Expand Up @@ -57,6 +60,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
Expand Down Expand Up @@ -122,3 +126,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"

0 comments on commit 59d6e6e

Please sign in to comment.