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-02-18 02:11:59 +03:00
|
|
|
name: Package ES Standard Build
|
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:06:56 +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:
|
|
|
|
gitHubConnection: sotteson1
|
|
|
|
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-02-18 02:11:59 +03:00
|
|
|
name: Package ES Standard Build
|
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 NuGet packages artifacts
|
|
|
|
patterns: 'NuGetPackages/*'
|
|
|
|
- task: NuGetToolInstaller@1
|
|
|
|
displayName: Use NuGet 5.x
|
|
|
|
inputs:
|
|
|
|
versionSpec: 5.x
|
2021-02-18 01:50:28 +03:00
|
|
|
- task: 333b11bd-d341-40d9-afcf-b32d5ce6f23b@2
|
|
|
|
# There's a problem on microsoft.visualstudio.com that requires the guid instead of NuGetCommand@2
|
|
|
|
displayName: Push package to nuget.org
|
2021-02-18 01:03:10 +03:00
|
|
|
inputs:
|
|
|
|
command: push
|
|
|
|
packagesToPush: $(Pipeline.Workspace)/win32metadata/NuGetPackages/*.nupkg
|
|
|
|
nuGetFeedType: external
|
|
|
|
publishFeedCredentials: WindowsSDK NuGet
|