This repository has been archived by the owner on Aug 27, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathcd-build.yml
74 lines (59 loc) · 1.87 KB
/
cd-build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
# Starter pipeline
# Start with a minimal pipeline that you can customize to build and deploy your code.
# Add steps that build, run tests, deploy, and more:
# https://aka.ms/yaml
trigger: none
pr: none
pool:
vmImage: 'ubuntu-latest'
resources:
repositories:
- repository: templates
type: github
name: arcus-azure/azure-devops-templates
endpoint: arcus-azure
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '3.7'
addToPath: true
architecture: 'x64'
- script: python -m pip install --upgrade pip setuptools wheel
displayName: 'Install tools'
- script: pip install -r requirements.txt
displayName: 'Install requirements'
- task: Bash@3
displayName: 'Update version number'
inputs:
targetType: 'inline'
script: 'sed -i ''s/1.0.0/$(Package.Version)/g'' arcus/ml/__init__.py'
failOnStderr: true
- script: |
python setup.py sdist bdist_wheel
displayName: 'Artifact creation'
- script: python -m pip install --upgrade twine
displayName: 'Install Twine'
- task: TwineAuthenticate@1
inputs:
pythonUploadServiceConnection: 'Arcus ML PyPi feed'
- template: github/create-release.yml@templates
parameters:
tag: '$(Package.Version)'
releaseTitle: '$(Package.Version)'
repositoryName: 'arcus-azure/arcus.ml'
releaseNotes: |
Install new version via [PyPi](https://pypi.org/project/arcus-ml/$(Package.Version))
```shell
PM > pip install arcus-ml==$(Package.Version)
```
- script: |
python -m twine upload --skip-existing --verbose -r 'arcus-ml' --config-file $(PYPIRC_PATH) dist/*
displayName: 'Publish to PyPi'
- task: CopyFiles@2
inputs:
targetFolder: $(Build.ArtifactStagingDirectory)
- task: PublishBuildArtifacts@1
inputs:
PathtoPublish: '$(Build.ArtifactStagingDirectory)'
ArtifactName: 'dist'
publishLocation: 'Container'