![](/img/trans.png)
[英]-split ' ' that works locally in Powershell does not work in a Azure pipeline Powershell task
[英]Github Release Azure Pipeline task - tagpattern wildcards does not work
在我的 azure devops 管道中設置 github 發布任務時遇到問題。 管道 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'
我輸入標簽的確切名稱(例如 tagPattern:'v1')它工作正常。 如果我使用上面的 tagpattern 並推送相同的標簽 v1,它只會給我##[warning]Release will not be created as the tags for the target commit do not match with the given tag pattern
。
我嘗試了其他一些正則表達式模式,但似乎模式匹配根本不起作用,只指定了確切的 git 標記名稱。 所以我的問題是,是否有一些我不知道的已知問題,或者如果我錯過了我應該在這里做的事情?
從代碼來看,它是將標簽模式粘貼到正則表達式中。 因此,您當前的模式將匹配零個或多個v
。 您需要v.*
來匹配任何以v
開頭的標簽。
看:
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.