73 строки
2.5 KiB
YAML
73 строки
2.5 KiB
YAML
trigger: none # We only want to trigger manually or based on resources
|
|
pr: none
|
|
|
|
resources:
|
|
pipelines:
|
|
- pipeline: win32metadata
|
|
source: Win32 Metadata
|
|
trigger:
|
|
tags:
|
|
- auto-release
|
|
|
|
stages:
|
|
- stage: GitHubRelease
|
|
displayName: GitHub Release
|
|
jobs:
|
|
- deployment: create
|
|
pool:
|
|
vmImage: windows-2019
|
|
environment: No-Approval 2
|
|
strategy:
|
|
runOnce:
|
|
deploy:
|
|
steps:
|
|
- download: none
|
|
- powershell: |
|
|
Write-Host "##vso[build.updatebuildnumber]$(resources.pipeline.win32metadata.runName)"
|
|
$runName = "$(resources.pipeline.win32metadata.runName)"
|
|
$tagName = $runName.Split('_')[0]
|
|
Write-Output "##vso[task.setvariable variable=TagName]$tagName"
|
|
displayName: Set pipeline name
|
|
- task: GitHubRelease@1
|
|
displayName: GitHub release (create)
|
|
inputs:
|
|
gitHubConnection: github.com_mikebattista
|
|
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:
|
|
vmImage: windows-2019
|
|
environment: No-Approval 2
|
|
strategy:
|
|
runOnce:
|
|
deploy:
|
|
steps:
|
|
- download: win32metadata
|
|
artifact: NuGetPackages
|
|
displayName: Download metadata and generators
|
|
- task: NuGetToolInstaller@1
|
|
displayName: Use NuGet 5.x
|
|
inputs:
|
|
versionSpec: 5.x
|
|
- powershell: |
|
|
Get-ChildItem .\NuGetPackages\*.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
|