|
78 | 78 |
|
79 | 79 | - job: report_coverage
|
80 | 80 | pool: {vmImage: 'Ubuntu 16.04'}
|
| 81 | + condition: always() |
81 | 82 | dependsOn:
|
82 | 83 | - windows_py37
|
83 | 84 | - windows_py36
|
@@ -169,21 +170,27 @@ jobs:
|
169 | 170 | displayName: publish code climate
|
170 | 171 | condition: succeededOrFailed()
|
171 | 172 |
|
172 |
| -- job: publish |
173 |
| - dependsOn: |
174 |
| - - report_coverage |
175 |
| - - linux_fix_lint |
176 |
| - - linux_docs |
177 |
| - - linux_package_description |
178 |
| - condition: and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags/')) |
179 |
| - pool: {vmImage: 'Ubuntu 16.04'} |
180 |
| - steps: |
181 |
| - - task: UsePythonVersion@0 |
182 |
| - displayName: setup python3.7 |
183 |
| - inputs: {versionSpec: '3.7'} |
184 |
| - - task: PyPIPublisher@0 |
185 |
| - displayName: Package and publish to PyPI |
186 |
| - inputs: |
187 |
| - pypiConnection: pypi-conn |
188 |
| - packageDirectory: $(System.DefaultWorkingDirectory) |
189 |
| - alsoPublishWheel: true |
| 173 | +- ${{ if startsWith(variables['Build.SourceBranch'], 'refs/tags/') }}: |
| 174 | + - job: publish |
| 175 | + dependsOn: |
| 176 | + - report_coverage |
| 177 | + - linux_fix_lint |
| 178 | + - linux_docs |
| 179 | + - linux_package_description |
| 180 | + condition: succeeded() |
| 181 | + pool: {vmImage: 'Ubuntu 16.04'} |
| 182 | + steps: |
| 183 | + - task: UsePythonVersion@0 |
| 184 | + displayName: setup python3.7 |
| 185 | + inputs: {versionSpec: '3.7'} |
| 186 | + - task: TwineAuthenticate@0 |
| 187 | + inputs: |
| 188 | + externalFeeds: 'toxdev' |
| 189 | + - script: 'python3.7 -m pip install -U twine pip tox' |
| 190 | + displayName: "acquire build tools" |
| 191 | + - script: 'python3.7 -m pip wheel -w "$(System.DefaultWorkingDirectory)/w" --no-deps .' |
| 192 | + displayName: "build wheel" |
| 193 | + - script: 'python3.7 -m tox -e py --sdistonly' |
| 194 | + displayName: "build sdist" |
| 195 | + - script: 'python3.7 -m twine upload -r pypi-toxdev --config-file $(PYPIRC_PATH) $(System.DefaultWorkingDirectory)/w/* .tox/dist/*' |
| 196 | + displayName: "upload sdist and wheel to PyPi" |
0 commit comments