win32metadata/release.yml

76 строки
2.6 KiB
YAML
Исходник Обычный вид История

2021-02-18 01:03:10 +03:00
trigger: none # We only want to trigger manually or based on resources
pr: none
resources:
pipelines:
- pipeline: win32metadata
source: microsoft.win32metadata
trigger:
tags:
- auto-release
stages:
- stage: GitHubRelease
displayName: GitHub Release
jobs:
- deployment: create
pool:
2021-10-14 18:34:25 +03:00
vmImage: windows-2019
2021-02-18 01:47:23 +03:00
environment: No-Approval 2
2021-02-18 01:03:10 +03:00
strategy:
runOnce:
deploy:
steps:
- download: none
- powershell: |
Write-Host "##vso[build.updatebuildnumber]$(resources.pipeline.win32metadata.runName)"
2021-02-18 02:20:46 +03:00
$runName = "$(resources.pipeline.win32metadata.runName)"
2021-02-18 01:03:10 +03:00
$tagName = $runName.Split('_')[0]
Write-Output "##vso[task.setvariable variable=TagName]$tagName"
displayName: Set pipeline name
- task: GitHubRelease@1
displayName: GitHub release (create)
inputs:
2021-02-18 02:31:06 +03:00
gitHubConnection: github.com_sotteson1
2021-02-18 01:03:10 +03:00
repositoryName: $(Build.Repository.Name)
target: $(resources.pipeline.win32metadata.sourceCommit)
tagSource: userSpecifiedTag
tag: v$(TagName)
title: v$(TagName)
isDraft: true # After running this step, visit the new draft release, edit, and publish.
changeLogCompareToRelease: lastNonDraftRelease
changeLogType: issueBased
changeLogLabels: |
[
{ "label" : "bug", "displayName" : "Fixes", "state" : "closed" },
{ "label" : "enhancement", "displayName": "Enhancements", "state" : "closed" }
]
- stage: nuget_org
displayName: nuget.org
dependsOn: GitHubRelease
jobs:
- deployment: push
pool:
2021-10-14 18:34:25 +03:00
vmImage: windows-2019
2021-02-18 01:47:23 +03:00
environment: No-Approval 2
2021-02-18 01:03:10 +03:00
strategy:
runOnce:
deploy:
steps:
- download: win32metadata
artifact: NuGetPackages
displayName: Download metadata and generators
- download: win32metadata
artifact: ApiDocsNuGetPackages
displayName: Download API docs
2021-02-18 01:03:10 +03:00
- task: NuGetToolInstaller@1
displayName: Use NuGet 5.x
inputs:
versionSpec: 5.x
- powershell: |
Get-ChildItem .\NuGetPackages\*.nupkg,.\ApiDocsNuGetPackages\*.nupkg -Exclude Microsoft.Dia.Win32Metadata.*.nupkg |% {
nuget push $_ -Source https://api.nuget.org/v3/index.json -SkipDuplicate -ApiKey $(NuGetOrgApiKey)
}
displayName: Push packages to nuget.org
workingDirectory: $(Pipeline.Workspace)/win32metadata