From 12ecfea0a62b709b27ff8404a8c4d9fb174fb4f8 Mon Sep 17 00:00:00 2001 From: Eric Thompson Date: Mon, 15 Aug 2022 17:21:05 -0600 Subject: [PATCH] Add build step to azure (#982) --- azure-pipelines.yml | 23 ++++++++++++++++++++++- setup.cfg | 3 +++ 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 9f0124c00..a9d2bc016 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -7,7 +7,12 @@ schedules: always: true trigger: -- main + branches: + include: + - main + tags: + include: + - 'release-*' name: $(Date:yyyyMMdd)$(Rev:.r) @@ -146,3 +151,19 @@ jobs: bash <(curl -s https://codecov.io/bash) displayName: Get coverage (Linux) condition: eq( variables['Agent.OS'], 'Linux' ) + + - bash: | + source activate gmprocess + pip install -e .[build] + python -m build + python3 -m twine upload dist/* + displayName: Build (mac/linux) + condition: and(succeeded(), ne( variables['Agent.OS'], 'Windows_NT' ), contains(variables['Build.SourceBranch'], 'refs/tags/release-')) + + - script: | + call activate gmprocess + pip install -e .[build] + python -m build + python3 -m twine upload dist/* + displayName: Build (Windows) + condition: and(succeeded(), eq( variables['Agent.OS'], 'Windows_NT' ), contains(variables['Build.SourceBranch'], 'refs/tags/release-')) diff --git a/setup.cfg b/setup.cfg index 706514581..2f036ccdf 100644 --- a/setup.cfg +++ b/setup.cfg @@ -64,6 +64,9 @@ doc = sphinx-copybutton sphinx-inline-tabs sphinxcontrib-programoutput +build = + build + twine [options.packages.find] where = src