Add release.yml

pull/747/head
NextTurn 2020-12-24 00:00:00 +08:00
parent 8cc17b5aa6
commit 4cf888c6c5
No known key found for this signature in database
GPG Key ID: 17A0D50ADDE1A0C4
1 changed files with 59 additions and 0 deletions

59
eng/release.yml Normal file
View File

@ -0,0 +1,59 @@
trigger: none
resources:
pipelines:
- pipeline: winsw
source: winsw.winsw
stages:
- stage: GitHub
jobs:
- job: Job
pool:
vmImage: windows-latest
steps:
- download: winsw
artifact: WinSW.NET2.exe_Release
- download: winsw
artifact: WinSW.NET4.exe_Release
- download: winsw
artifact: WinSW.NET461.exe_Release
- download: winsw
artifact: WinSW-x64.exe_Release
- download: winsw
artifact: WinSW-x86.exe_Release
- download: winsw
artifact: sample-allOptions.xml
- download: winsw
artifact: sample-minimal.xml
- ${{ if ne(variables['Build.RequestedForEmail'], '') }}:
- task: GitHubRelease@1
inputs:
gitHubConnection: GitHub $(Build.RequestedForEmail)
repositoryName: $(Build.Repository.Name)
action: create
target: $(Build.SourceVersion)
tagSource: userSpecifiedTag
tag: v$(Major).$(Minor).$(Patch)
title: WinSW v$(Major).$(Minor).$(Patch)
assets: |
$(Pipeline.Workspace)/**/*.xml
$(Pipeline.Workspace)/**/*.exe
$(Pipeline.Workspace)/**/*.zip
isDraft: true
isPreRelease: true
addChangeLog: false
- stage: NuGet
jobs:
- job: Job
pool:
vmImage: windows-latest
steps:
- download: winsw
artifact: WinSW.nupkg_Release
- task: NuGetCommand@2
inputs:
command: pack
packagesToPush: $(Pipeline.Workspace)/**/WinSW.*.nupkg
nuGetFeedType: external
publishFeedCredentials: NuGet