如果有人可以帮助我,我不确定 yaml 出了什么问题。我检查了 5 或 6 个不同的在线 YAML 编辑器,我被告知它是“有效”的 yaml。
我在那里有一个 nuget pack 命令——等待在我获得此文件上的有效语法时添加 nuget 推送..
trigger:
batch: true
branches:
include:
- "*"
name: "SharpPDFLabel Build"
pool:
vmImage: "windows-latest"
variables:
solution: "**/SharpPDFLabel/*.sln"
buildPlatform: "Any CPU"
buildConfiguration: "Release"
Major: "1"
Minor: "0"
Patch: "0"
steps:
- task: NuGetToolInstaller@1
- task: NuGetCommand@2
inputs:
restoreSolution: "$(solution)"
- task: VSBuild@1
inputs:
solution: "$(solution)"
platform: "$(buildPlatform)"
configuration: "$(buildConfiguration)"
- task: VSTest@2
inputs:
platform: "$(buildPlatform)"
configuration: "$(buildConfiguration)"
- task: NuGetCommand@2
inputs:
command: "pack"
versioningScheme: "byPrereleaseNumber"
majorVersion: "$(Major)"
minorVersion: "$(Minor)"
patchVersion: "$(Patch)"
packagesToPack: "**/SharpPDFLabel/SharpPDFLabel.csproj"
packDestination: "$(Build.ArtifactStagingDirectory)"
不知道为什么投反对票?可能是缺少更新?管道曾经/现在是有效的...问题是我已通过管道文件从
azure-pipelines.yml
重命名为 <custom>-pipeline.yml
。一旦我将其重命名为azure-pipelines.yml
,上面的工作就成功了