Add release.yml file
This allows us to manage the release pipeline using version control just as we do our build pipeline. Our v2.1 and v2.2 versions require different release pipelines so it makes sense to be able to version them this way.
This commit is contained in:
Родитель
459e2bd921
Коммит
88f256ded1
|
@ -11,6 +11,10 @@ trim_trailing_whitespace = true
|
||||||
|
|
||||||
# (Please don't specify an indent_size here; that has too many unintended consequences.)
|
# (Please don't specify an indent_size here; that has too many unintended consequences.)
|
||||||
|
|
||||||
|
[*.yml]
|
||||||
|
indent_size = 2
|
||||||
|
indent_style = space
|
||||||
|
|
||||||
# Code files
|
# Code files
|
||||||
[*.{cs,csx,vb,vbx,h,cpp,idl}]
|
[*.{cs,csx,vb,vbx,h,cpp,idl}]
|
||||||
indent_size = 4
|
indent_size = 4
|
||||||
|
|
|
@ -0,0 +1,88 @@
|
||||||
|
trigger: none # We only want to trigger manually or based on resources
|
||||||
|
pr: none
|
||||||
|
|
||||||
|
resources:
|
||||||
|
pipelines:
|
||||||
|
- pipeline: CI
|
||||||
|
source: MessagePack-CSharp-CI
|
||||||
|
trigger:
|
||||||
|
tags:
|
||||||
|
- auto-release
|
||||||
|
|
||||||
|
stages:
|
||||||
|
- stage: GitHubRelease
|
||||||
|
displayName: GitHub Release
|
||||||
|
jobs:
|
||||||
|
- deployment: create
|
||||||
|
pool:
|
||||||
|
vmImage: ubuntu-latest
|
||||||
|
environment: No-Approval
|
||||||
|
strategy:
|
||||||
|
runOnce:
|
||||||
|
deploy:
|
||||||
|
steps:
|
||||||
|
- powershell: |
|
||||||
|
Write-Host "##vso[build.updatebuildnumber]$(resources.pipeline.CI.runName)"
|
||||||
|
displayName: Set pipeline name
|
||||||
|
- download: CI
|
||||||
|
artifact: mpc
|
||||||
|
displayName: 'Downloading artifact: mpc'
|
||||||
|
- download: CI
|
||||||
|
artifact: unity
|
||||||
|
displayName: 'Downloading artifact: unity'
|
||||||
|
- download: CI
|
||||||
|
artifact: vsix
|
||||||
|
displayName: 'Downloading artifact: vsix'
|
||||||
|
- task: ArchiveFiles@2
|
||||||
|
displayName: Archive mpc
|
||||||
|
inputs:
|
||||||
|
rootFolderOrFile: $(Pipeline.Workspace)/CI/mpc
|
||||||
|
includeRootFolder: false
|
||||||
|
archiveFile: $(Pipeline.Workspace)/mpc.zip
|
||||||
|
- task: GitHubRelease@1
|
||||||
|
displayName: GitHub release (create)
|
||||||
|
inputs:
|
||||||
|
gitHubConnection: AArnott github
|
||||||
|
repositoryName: $(Build.Repository.Name)
|
||||||
|
target: $(resources.pipeline.CI.sourceCommit)
|
||||||
|
tagSource: userSpecifiedTag
|
||||||
|
tag: v$(resources.pipeline.CI.runName)
|
||||||
|
title: v$(resources.pipeline.CI.runName)
|
||||||
|
assets: |
|
||||||
|
$(Pipeline.Workspace)/CI/unity/*.unitypackage
|
||||||
|
$(Pipeline.Workspace)/CI/vsix/*
|
||||||
|
$(Pipeline.Workspace)/mpc.zip
|
||||||
|
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: ubuntu-latest
|
||||||
|
environment: No-Approval
|
||||||
|
strategy:
|
||||||
|
runOnce:
|
||||||
|
deploy:
|
||||||
|
steps:
|
||||||
|
- download: CI
|
||||||
|
artifact: nuget
|
||||||
|
- 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/nuget/*.nupkg
|
||||||
|
nuGetFeedType: external
|
||||||
|
publishFeedCredentials: nuget.org (aarnott)
|
Загрузка…
Ссылка в новой задаче