Skip to content

Commit

Permalink
Build source dist
Browse files Browse the repository at this point in the history
Fix upload artifact dir.
  • Loading branch information
syoyo committed May 28, 2020
1 parent 60160f7 commit 04f5410
Showing 1 changed file with 17 additions and 4 deletions.
21 changes: 17 additions & 4 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,23 @@ jobs:
# Make the header files available to the build.
cp *.h python
cd python
# Source dist
python3 setup.py sdist
# build binary wheels
cibuildwheel --output-dir wheelhouse .
- task: CopyFiles@2
inputs:
contents: 'python/wheelhouse/**'
targetFolder: $(Build.ArtifactStagingDirectory)

- task: CopyFiles@2
inputs:
contents: 'python/sdist/**'
targetFolder: $(Build.ArtifactStagingDirectory)

- task: PublishBuildArtifacts@1
inputs:
path: $(Build.ArtifactStagingDirectory)
Expand Down Expand Up @@ -108,26 +120,27 @@ jobs:
- task: DownloadBuildArtifacts@0
inputs:
artifactName: 'tinyobjDeployLinux'
downloadPath: $(Pipeline.Workspace)/tinyobjDeployLinux
downloadPath: $(Pipeline.Workspace)

- task: DownloadBuildArtifacts@0
inputs:
artifactName: 'tinyobjDeployMacOS'
downloadPath: $(Pipeline.Workspace)/tinyobjDeployMacOS
downloadPath: $(Pipeline.Workspace)

- task: DownloadBuildArtifacts@0
inputs:
artifactName: 'tinyobjDeployWindows'
downloadPath: $(Pipeline.Workspace)/tinyobjDeployWindows
downloadPath: $(Pipeline.Workspace)

# Publish to PyPI through twine
- bash: |
cd $(Pipeline.Workspace)
find .
python -m pip install --upgrade pip
pip install twine
echo tinyobjDeployLinux/python/sdist/*
echo tinyobjDeployLinux/python/wheelhouse/* tinyobjDeployMacOS/python/wheelhouse/* tinyobjDeployWindows/python/wheelhouse/*
twine upload -u "__token__" --skip-existing tinyobjDeployLinux/python/wheelhouse/* tinyobjDeployMacOS/python/wheelhouse/* tinyobjDeployWindows/python/wheelhouse/*
twine upload -u "__token__" --skip-existing tinyobjDeployLinux/python/sdist/* tinyobjDeployLinux/python/wheelhouse/* tinyobjDeployMacOS/python/wheelhouse/* tinyobjDeployWindows/python/wheelhouse/*
env:
TWINE_PASSWORD: $(pypiToken2)
Expand Down

0 comments on commit 04f5410

Please sign in to comment.