diff --git a/ci/onnx2bnn_build.yml b/ci/onnx2bnn_build.yml index ca24bcf..c00936c 100644 --- a/ci/onnx2bnn_build.yml +++ b/ci/onnx2bnn_build.yml @@ -47,55 +47,20 @@ jobs: inputs: pathtoPublish: $(Build.ArtifactStagingDirectory) artifactName: onnx2bnn AppImage - - task: GitHubRelease@0 - condition: and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags/v')) - inputs: - gitHubConnection: 'dabnn release' - repositoryName: '$(Build.Repository.Name)' - action: 'edit' - tag: '$(Build.SourceBranchName)' - target: '$(Build.SourceVersion)' - assets: '$(Build.ArtifactStagingDirectory)/*' - assetUploadMode: 'replace' + - template: template_onnx2bnn_github_release.yml - job: Windows_Python_Package pool: vmImage: 'vs2017-win2016' steps: - checkout: self submodules: true - - task: UsePythonVersion@0 - inputs: - versionSpec: '3.7' - addToPath: true - architecture: 'x64' - - template: template_onnx2bnn_build_python.yml - - task: UsePythonVersion@0 - inputs: - versionSpec: '3.6' - addToPath: true - architecture: 'x64' - - template: template_onnx2bnn_build_python.yml - - task: UsePythonVersion@0 - inputs: - versionSpec: '3.5' - addToPath: true - architecture: 'x64' - - template: template_onnx2bnn_build_python.yml + - template: template_onnx2bnn_build_python_all_version.yml - task: CopyFiles@2 inputs: sourceFolder: '.setuptools-cmake-build\tools\onnx2bnn\Release\' contents: 'onnx2bnn.exe' targetFolder: $(Build.ArtifactStagingDirectory) - - task: GitHubRelease@0 - condition: and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags/v')) - inputs: - gitHubConnection: 'dabnn release' - repositoryName: '$(Build.Repository.Name)' - action: 'edit' - tag: '$(Build.SourceBranchName)' - target: '$(Build.SourceVersion)' - assets: '$(Build.ArtifactStagingDirectory)/*' - assetUploadMode: 'replace' + - template: template_onnx2bnn_github_release.yml - script: python -m twine upload dist/* --verbose condition: and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags/v')) displayName: Upload wheel to PyPI diff --git a/ci/template_onnx2bnn_build_python_all_version.yml b/ci/template_onnx2bnn_build_python_all_version.yml new file mode 100644 index 0000000..0dce96e --- /dev/null +++ b/ci/template_onnx2bnn_build_python_all_version.yml @@ -0,0 +1,20 @@ +steps: + - task: UsePythonVersion@0 + inputs: + versionSpec: '3.7' + addToPath: true + architecture: 'x64' + - template: template_onnx2bnn_build_python.yml + - task: UsePythonVersion@0 + inputs: + versionSpec: '3.6' + addToPath: true + architecture: 'x64' + - template: template_onnx2bnn_build_python.yml + - task: UsePythonVersion@0 + inputs: + versionSpec: '3.5' + addToPath: true + architecture: 'x64' + - template: template_onnx2bnn_build_python.yml + diff --git a/ci/template_onnx2bnn_github_release.yml b/ci/template_onnx2bnn_github_release.yml new file mode 100644 index 0000000..84eb2e0 --- /dev/null +++ b/ci/template_onnx2bnn_github_release.yml @@ -0,0 +1,12 @@ +steps: + - task: GitHubRelease@0 + condition: and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags/v')) + inputs: + gitHubConnection: 'dabnn release' + repositoryName: '$(Build.Repository.Name)' + action: 'edit' + tag: '$(Build.SourceBranchName)' + target: '$(Build.SourceVersion)' + assets: '$(Build.ArtifactStagingDirectory)/*' + assetUploadMode: 'replace' +