1

Have an issue setting up a github release task in my azure devops pipeline. The pipeline yml looks like the following (its for a multi framework nuget package if that is of any use):

trigger:
- master

pool:
  vmImage: 'ubuntu-latest'

workspace:
    clean: all

...

- task: GitHubRelease@1
  inputs:
    gitHubConnection: '**/**'
    repositoryName: '$(Build.Repository.Name)'
    action: 'create'
    target: '$(Build.SourceVersion)'
    tagSource: 'gitTag'
    tagPattern: 'v*'
    changeLogCompareToRelease: 'lastFullRelease'
    changeLogType: 'commitBased'

I i enter the exact name of the tag (for example tagPattern: 'v1') it works fine. If i use the tagpattern above and push the same tag, v1, it just gives me ##[warning]Release will not be created as the tags for the target commit do not match with the given tag pattern warning.

I tried some other regex patterns but it seems that pattern matching does not work at all, only specifying the exact git tag name. So my question is if there is some known issue im not aware of or if im missing something i should be doing here?

jessehouwing
  • 106,458
  • 22
  • 256
  • 341
Base
  • 1,061
  • 1
  • 11
  • 27

1 Answers1

1

Judging from the code, it's pasting the tag pattern into a regex. Your current pattern would thus match zero or more v's. You'd need v.* to match any tags that start with v.

See:

jessehouwing
  • 106,458
  • 22
  • 256
  • 341
  • Borderline embarrassing mistake on my part. Thanks for setting me straight, it works fine now. – Base May 30 '20 at 22:49
  • 1
    It could have been one of 23 other pattern formats geven each task seems to pick trees own. I'm glad it's a standard regex for once, but it could have been a glob is a wildcard or a... – jessehouwing May 31 '20 at 08:16