Skip to content

Commit

Permalink
Add pre-release parameter in pipelines
Browse files Browse the repository at this point in the history
  • Loading branch information
gclendenning committed Jun 17, 2024
1 parent 6d01903 commit 0d0360b
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@ pr:
- doc/*
- README.rst

parameters:
- name: includeReleaseCandidates
displayName: "Allow pre-release dependencies"
type: boolean
default: false

variables:
triggeredByPullRequest: $[eq(variables['Build.Reason'], 'PullRequest')]

Expand Down Expand Up @@ -68,8 +74,17 @@ stages:

- script: |
python -m pip install --upgrade pip
displayName: 'Upgrade pip'
- script: |
pip install -r requirements.txt
displayName: 'Install dependencies'
condition: ${{ eq(parameters.includeReleaseCandidates, false) }}
- script: |
pip install --pre -r requirements.txt
displayName: 'Install dependencies (allow pre-releases)'
condition: ${{ eq(parameters.includeReleaseCandidates, true) }}
- script: |
pip install -e .
Expand Down Expand Up @@ -143,6 +158,6 @@ stages:

- script: |
pip install twine
twine upload --repository testpypi --config-file $(PYPIRC_CONFIG.secureFilePath) dist/*
twine upload --repository pypi --config-file $(PYPIRC_CONFIG.secureFilePath) dist/*
displayName: 'Upload to PyPI'
condition: and(succeeded(), eq(variables['Build.SourceBranchName'], variables['packageVersionFormatted']))

0 comments on commit 0d0360b

Please sign in to comment.