Skip to content

Commit

Permalink
Merge pull request #2713 from jenshnielsen/CI_github_action_upload
Browse files Browse the repository at this point in the history
Move upload to pypi to Github actions
  • Loading branch information
jenshnielsen authored Feb 11, 2021
2 parents f3a1031 + 836c20f commit b4294ea
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 19 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/upload_to_pypi.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Upload Python Package

on:
push:
tags:
- v*

jobs:
deploy:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.7'
- name: Build
run: |
python setup.py sdist bdist_wheel
- name: Install Twine
run: pip install twine
- name: Publish
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
twine upload dist/*
16 changes: 0 additions & 16 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,19 +109,3 @@ 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_upload_to_pypi
condition: and(succeeded(), eq( variables['Agent.OS'], 'Linux' ), contains(variables['Build.SourceBranch'], 'refs/tags/'))
- 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" --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"
4 changes: 1 addition & 3 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@
name = qcodes
maintainer = QCoDeS Core Developers
maintainer_email = qcodes-support@microsoft.com
description = Python-based data acquisition framework developed by the
Copenhagen / Delft / Sydney / Microsoft quantum computing
consortium
description = Python-based data acquisition framework developed by the Copenhagen / Delft / Sydney / Microsoft quantum computing consortium
long_description = file: README.rst
long_description_content_type = text/x-rst
url = https://github.com/QCoDeS/Qcodes
Expand Down

0 comments on commit b4294ea

Please sign in to comment.