Skip to content

Commit

Permalink
release for tags only (#40)
Browse files Browse the repository at this point in the history
  • Loading branch information
Korijn authored and almarklein committed Jan 15, 2020
1 parent d39a94a commit 0d85d00
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
trigger:
- master
branches:
include:
- master
tags:
include:
- v*

variables:
NAME: wgpu

jobs:

- job: Build
strategy:
matrix:
Expand Down Expand Up @@ -162,7 +166,6 @@ jobs:

- job: Release
dependsOn: Build
condition: and(succeeded(), eq(variables['Build.SourceBranchName'], 'master'))
pool:
vmImage: ubuntu-16.04
steps:
Expand All @@ -176,17 +179,17 @@ jobs:
targetType: inline
script: |
set -x
TAGS=$(git describe --tags)
echo "##vso[task.setvariable variable=TAGS]$TAGS"
TAG=$(git describe --tags)
echo "##vso[task.setvariable variable=TAG]$TAG"
- task: DownloadBuildArtifacts@0
displayName: Download dist
condition: and(succeeded(), ne(variables['TAGS'], ''))
condition: and(succeeded(), eq(variables['Build.SourceBranchName'], variables['TAG']))
inputs:
artifactName: dist
downloadPath: .
- task: GithubRelease@1
displayName: GitHub Release
condition: and(succeeded(), ne(variables['TAGS'], ''))
condition: and(succeeded(), eq(variables['Build.SourceBranchName'], variables['TAG']))
inputs:
gitHubConnection: github.com_almarklein
repositoryName: 'almarklein/wgpu-py'
Expand All @@ -198,7 +201,7 @@ jobs:
assetUploadMode: replace
- task: Bash@3
displayName: Install twine
condition: and(succeeded(), ne(variables['TAGS'], ''))
condition: and(succeeded(), eq(variables['Build.SourceBranchName'], variables['TAG']))
inputs:
targetType: inline
script: |
Expand All @@ -207,12 +210,12 @@ jobs:
python -m pip install -U wheel twine
- task: TwineAuthenticate@1
displayName: Authenticate with PyPI
condition: and(succeeded(), ne(variables['TAGS'], ''))
condition: and(succeeded(), eq(variables['Build.SourceBranchName'], variables['TAG']))
inputs:
pythonUploadServiceConnection: pypi
- task: Bash@3
displayName: Upload dist to PyPI
condition: and(succeeded(), ne(variables['TAGS'], ''))
condition: and(succeeded(), eq(variables['Build.SourceBranchName'], variables['TAG']))
inputs:
targetType: inline
script: |
Expand Down

0 comments on commit 0d85d00

Please sign in to comment.