加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
azure-pipelines.yml 2.05 KB
一键复制 编辑 原始数据 按行查看 历史
XiaoYang 提交于 2021-11-20 23:30 . Bump to version 15.
# ASP.NET Core
# Build and test ASP.NET Core projects targeting .NET Core.
# Add steps that run tests, create a NuGet package, deploy, and more:
# https://docs.microsoft.com/azure/devops/pipelines/languages/dotnet-core
trigger:
branches:
include:
- '*'
tags:
include:
- '*'
resources:
repositories:
- repository: "Azure Repos Mirror"
type: git
name: namomo/blogging
variables:
- group: azure-repos-sync
jobs:
- job: Build
displayName: "Build, Test and Publish"
pool:
vmImage: ubuntu-latest
steps:
- task: Bash@3
inputs:
targetType: 'inline'
script: 'echo "ref: $(Build.SourceBranch)" > $(Build.SourcesDirectory)/.git/ADO_OVERRIDE_HEAD'
displayName: 'Set Source Branch'
- task: UseDotNet@2
inputs:
packageType: 'sdk'
version: '6.0.x'
displayName: 'Setup Build Environment'
- task: DotNetCoreCLI@2
inputs:
command: 'build'
displayName: 'Build the Module'
- task: DotNetCoreCLI@2
inputs:
command: 'test'
testRunTitle: 'Run unit tests'
displayName: 'Run Unit Tests'
- task: DotNetCoreCLI@2
inputs:
command: 'custom'
custom: 'pack'
arguments: '-c Release -o $(Build.ArtifactStagingDirectory)'
displayName: 'Package for NuGet'
- task: NuGetAuthenticate@0
displayName: 'Authenticate with NuGet Feed'
condition: startsWith(variables['Build.SourceBranch'], 'refs/tags/')
- task: NuGetCommand@2
inputs:
command: 'push'
packagesToPush: '$(Build.ArtifactStagingDirectory)/**/*.nupkg'
nuGetFeedType: 'internal'
publishVstsFeed: '5f8d36de-7004-4c36-a8b5-8a4bda9eb598/c2949ad7-bda3-4f23-a41b-3109c9419cb7'
allowPackageConflicts: true
displayName: 'Push to NuGet Feed'
condition: startsWith(variables['Build.SourceBranch'], 'refs/tags/')
- job: Sync
displayName: "Sync with Azure Repos"
pool:
vmImage: windows-latest
steps:
- task: gitmirror@0
inputs:
GitRepoUrl: 'https://tlylz:$(SYNC_PAT)@dev.azure.com/tlylz/namomo/_git/blogging'
displayName: 'Sync via Git Tools'
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化