I'm trying to create a tag when I aprove every pull request, but it isn't possible to me. this is my pipeline.yml
trigger:
- main
pool:
vmImage: ubuntu-latest
steps:
- task: UseDotNet@2
displayName: 'Install SDK .Net'
inputs:
version: 7.x
performMultiLevelLookup: true
- task: DotNetCoreCLI@2
displayName: 'Restore APP'
inputs:
command: 'restore'
projects: '**/ProyectoUno.csproj'
feedsToUse: 'select'
vstsFeed: '2822941f-fa33-4f11-8dd5-0a4d3a7657c6'
- task: DotNetCoreCLI@2
displayName: 'Build APP'
inputs:
command: 'build'
projects: 'ProyectoUno/*.csproj'
arguments: '--no-restore --configuration $(BuildConfiguration)'
- task: DotNetCoreCLI@2
displayName: 'Publis APP'
inputs:
command: 'publish'
publishWebProjects: false
projects: 'ProyectoUno/*.csproj'
arguments: '--no-restore --configuration $(BuildConfiguration) --output "$(Build.ArtifacStagingDirectory)"'
- checkout: self
persistCredentials: true
- script: |
git config --global user.email "tunombre@ejemplo.com"
git config --global user.name "Tu Nombre"
git tag "release_$(Build.BuildId)"
git push origin "release_$(Build.BuildId)"
displayName: 'Crear y empujar tag de Git'
- task: PublishBuildArtifacts@1
inputs:
PathtoPublish: '$(Build.ArtifactStagingDirectory)'
ArtifactName: 'ProyectoUno'
publishLocation: 'Container'
But the last script doesn't work, because I have this error ##[error]No files matched the search pattern.
I read this post Fatal: Could not read password for 'https://OrganizationName@dev.azure.com': terminal prompts disabled and doesn't work for me.
I wish to be able to create a tag every pull request complete because I create a release for each pull in dev, qa or main master and I need to block every relase with a one tag, today I do it manual but I'm trying to do it automaticaly.