简体   繁体   English

Github 发布 Azure 管道任务 - tagpattern 通配符不起作用

[英]Github Release Azure Pipeline task - tagpattern wildcards does not work

Have an issue setting up a github release task in my azure devops pipeline.在我的 azure devops 管道中设置 github 发布任务时遇到问题。 The pipeline yml looks like the following (its for a multi framework nuget package if that is of any use):管道 yml 如下所示(对于多框架 nuget package,如果有任何用处):

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.我输入标签的确切名称(例如 tagPattern:'v1')它工作正常。 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.如果我使用上面的 tagpattern 并推送相同的标签 v1,它只会给我##[warning]Release will not be created as the tags for the target commit do not match with the given tag pattern

I tried some other regex patterns but it seems that pattern matching does not work at all, only specifying the exact git tag name.我尝试了其他一些正则表达式模式,但似乎模式匹配根本不起作用,只指定了确切的 git 标记名称。 So my question is if there is some known issue im not aware of or if im missing something i should be doing here?所以我的问题是,是否有一些我不知道的已知问题,或者如果我错过了我应该在这里做的事情?

Judging from the code, it's pasting the tag pattern into a regex.从代码来看,它是将标签模式粘贴到正则表达式中。 Your current pattern would thus match zero or more v 's.因此,您当前的模式将匹配零个或多个v You'd need v.* to match any tags that start with v .您需要v.*来匹配任何以v开头的标签。

See:看:

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在 Powershell 本地工作的 -split ' ' 在 Azure 管道 Powershell 任务中不起作用 - -split ' ' that works locally in Powershell does not work in a Azure pipeline Powershell task 将更改推送到 GitHub 存储库作为 Azure DevOps 中发布管道的一部分 - Push changes to GitHub repository as a part of release pipeline in Azure DevOps 如何在Azure Pipeline Bash任务中验证git push到GitHub的身份 - How to authenticate git push to GitHub within an Azure Pipeline Bash task 如何使用 Bash 将资产从 Azure 发布管道上传到 Github Enterprise - How to upload an asset from Azure Release pipeline to Github Enterprise using Bash Azure DevOps、发布管道、Powershell 任务:即使操作成功,提取 .tar.gz 仍显示为失败 - Azure DevOps, Release Pipeline, Powershell task: Extracting .tar.gz shown as failure even after operation succeeds Azure 发布管道:通过提交同步文件 - Azure release pipeline: synce files with commit 基于 Azure 发布管道在 Git 中标记提交 - Tag a commit in Git based on an Azure release pipeline 从 Azure 发布管道执行 Git 推送 - Doing Git Pushes from the Azure Release Pipeline 如何从GitHub版本而不是存储库中部署Azure? - How to deploy Azure from GitHub release not repository? 提交时的 Azure 管道过滤器 github 用户 - Azure pipeline filter github user on commit
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM