-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathazure-pipelines.yml
54 lines (52 loc) · 1.61 KB
/
azure-pipelines.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
# Python package
# Create and test a Python package on multiple Python versions.
# Add steps that analyze code, save the dist with the build record, publish to a PyPI-compatible index, and more:
# https://docs.microsoft.com/azure/devops/pipelines/languages/python
trigger:
- main
- master
pool:
vmImage: ubuntu-latest
resources:
repositories:
- repository: templates
type: github
name: CroudTech/devops-azure-pipelines-step-templates
ref: master
endpoint: CroudTech
- repository: self
variables:
- group: "package_managers"
- name: python_version
value: 3.12
jobs:
- job: build
displayName: Build
condition: in(variables['Build.SourceBranchName'], 'integration', 'main', 'master')
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: "$(python_version)"
displayName: "Use Python $(python_version)"
- task: gitversion/setup@0
displayName: Install GitVersion
inputs:
versionSpec: 5.x
- task: gitversion/execute@0
displayName: Use GitVersion
- script: |
curl -sSL https://install.python-poetry.org | python3 -
poetry install
poetry version $(semVer)
poetry build
poetry publish --username __token__ --password $(pypi_token)
- job: GithubRelease
dependsOn: build
displayName: GithubRelease
steps:
- template: release/github-release.yaml@templates
parameters:
semVer: $(semVer)
github_access_token: $(github_access_token)
github_org: CroudTech
github_repo: croudtech-python-aws-app-config