зеркало из https://github.com/dotnet/pinvoke.git
Move release stages to its own pipeline
This commit is contained in:
Родитель
ab5873adb1
Коммит
3c1cf12afe
|
@ -8,6 +8,7 @@ trigger:
|
|||
- doc/
|
||||
- '*.md'
|
||||
- .vscode/
|
||||
- azure-pipelines/release.yml
|
||||
|
||||
stages:
|
||||
- stage: Build
|
||||
|
@ -22,68 +23,3 @@ stages:
|
|||
GeneratePInvokesTxt: true
|
||||
jobs:
|
||||
- template: azure-pipelines/build.yml
|
||||
|
||||
- stage: GitHubRelease
|
||||
displayName: GitHub Release
|
||||
condition: and(succeeded(), ne(variables['Build.Reason'], 'PullRequest'))
|
||||
jobs:
|
||||
- deployment: create
|
||||
pool:
|
||||
vmImage: ubuntu-latest
|
||||
environment: Approval
|
||||
strategy:
|
||||
runOnce:
|
||||
deploy:
|
||||
steps:
|
||||
- download: current
|
||||
artifact: pinvoke_coverage_report-Windows
|
||||
displayName: Downloading pinvoke coverage report
|
||||
- download: current
|
||||
artifact: pinvoke_method_coverage-Windows
|
||||
displayName: Downloading pinvoke method coverage
|
||||
- task: GitHubRelease@1
|
||||
displayName: GitHub release (create)
|
||||
inputs:
|
||||
gitHubConnection: GitHub AArnott
|
||||
repositoryName: $(Build.Repository.Name)
|
||||
tagSource: userSpecifiedTag
|
||||
tag: v$(Build.BuildNumber)
|
||||
title: v$(Build.BuildNumber)
|
||||
isDraft: true
|
||||
assets: |
|
||||
$(Pipeline.Workspace)/pinvoke_method_coverage-Windows/*
|
||||
$(Pipeline.Workspace)/pinvoke_coverage_report-Windows/*
|
||||
changeLogCompareToRelease: lastNonDraftRelease
|
||||
changeLogType: issueBased
|
||||
changeLogLabels: |
|
||||
[
|
||||
{ "label" : "bug", "displayName" : "Fixes", "state" : "closed" },
|
||||
{ "label" : "enhancement", "displayName": "Enhancements", "state" : "closed" }
|
||||
]
|
||||
|
||||
- stage: nuget_org
|
||||
displayName: nuget.org
|
||||
condition: and(succeeded(), ne(variables['Build.Reason'], 'PullRequest'))
|
||||
jobs:
|
||||
- deployment: push
|
||||
pool:
|
||||
vmImage: ubuntu-latest
|
||||
environment: No-Approval # Approval is already granted in the release stage.
|
||||
strategy:
|
||||
runOnce:
|
||||
deploy:
|
||||
steps:
|
||||
- download: current
|
||||
artifact: deployables-Windows
|
||||
displayName: Download deployables-Windows artifact
|
||||
- task: NuGetToolInstaller@1
|
||||
displayName: Use NuGet 5.x
|
||||
inputs:
|
||||
versionSpec: 5.x
|
||||
- task: NuGetCommand@2
|
||||
displayName: NuGet push
|
||||
inputs:
|
||||
command: push
|
||||
packagesToPush: $(Pipeline.Workspace)/deployables-Windows/*.nupkg
|
||||
nuGetFeedType: external
|
||||
publishFeedCredentials: nuget.org
|
||||
|
|
|
@ -0,0 +1,80 @@
|
|||
trigger: none # We only want to trigger manually or based on resources
|
||||
|
||||
resources:
|
||||
pipelines:
|
||||
- pipeline: CI
|
||||
source: PInvoke
|
||||
trigger:
|
||||
tags:
|
||||
- auto-release
|
||||
|
||||
stages:
|
||||
- stage: GitHubRelease
|
||||
displayName: GitHub Release
|
||||
condition: and(succeeded(), ne(variables['Build.Reason'], 'PullRequest'))
|
||||
jobs:
|
||||
- deployment: create
|
||||
pool:
|
||||
vmImage: ubuntu-latest
|
||||
environment: Approval
|
||||
strategy:
|
||||
runOnce:
|
||||
deploy:
|
||||
steps:
|
||||
- powershell: |
|
||||
Write-Host "##vso[build.updatebuildnumber]$(resources.pipeline.CI.runName)"
|
||||
displayName: Set pipeline name
|
||||
- download: current
|
||||
artifact: pinvoke_coverage_report-Windows
|
||||
displayName: Downloading pinvoke coverage report
|
||||
- download: current
|
||||
artifact: pinvoke_method_coverage-Windows
|
||||
displayName: Downloading pinvoke method coverage
|
||||
- task: GitHubRelease@1
|
||||
displayName: GitHub release (create)
|
||||
inputs:
|
||||
gitHubConnection: GitHub AArnott
|
||||
repositoryName: $(Build.Repository.Name)
|
||||
target: $(resources.pipeline.CI.sourceCommit)
|
||||
tagSource: userSpecifiedTag
|
||||
tag: v$(resources.pipeline.CI.runName)
|
||||
title: v$(resources.pipeline.CI.runName)
|
||||
isDraft: true
|
||||
assets: |
|
||||
$(Pipeline.Workspace)/CI/pinvoke_method_coverage-Windows/*
|
||||
$(Pipeline.Workspace)/CI/pinvoke_coverage_report-Windows/*
|
||||
changeLogCompareToRelease: lastNonDraftRelease
|
||||
changeLogType: issueBased
|
||||
changeLogLabels: |
|
||||
[
|
||||
{ "label" : "bug", "displayName" : "Fixes", "state" : "closed" },
|
||||
{ "label" : "enhancement", "displayName": "Enhancements", "state" : "closed" }
|
||||
]
|
||||
|
||||
- stage: nuget_org
|
||||
displayName: nuget.org
|
||||
condition: and(succeeded(), ne(variables['Build.Reason'], 'PullRequest'))
|
||||
jobs:
|
||||
- deployment: push
|
||||
pool:
|
||||
vmImage: ubuntu-latest
|
||||
environment: No-Approval # Approval is already granted in the release stage.
|
||||
strategy:
|
||||
runOnce:
|
||||
deploy:
|
||||
steps:
|
||||
- download: current
|
||||
artifact: deployables-Windows
|
||||
displayName: Download deployables-Windows artifact
|
||||
patterns: '**/*.*nupkg'
|
||||
- task: NuGetToolInstaller@1
|
||||
displayName: Use NuGet 5.x
|
||||
inputs:
|
||||
versionSpec: 5.x
|
||||
- task: NuGetCommand@2
|
||||
displayName: NuGet push
|
||||
inputs:
|
||||
command: push
|
||||
packagesToPush: $(Pipeline.Workspace)/CI/deployables-Windows/*.nupkg
|
||||
nuGetFeedType: external
|
||||
publishFeedCredentials: nuget.org
|
Загрузка…
Ссылка в новой задаче