Skip to content
This repository was archived by the owner on Aug 17, 2021. It is now read-only.

Commit c2ad243

Browse files
authored
publish ECMA2Yaml to ReferenceAutomation feed (#198)
* publish ECMA2Yaml to ReferenceAutomation feed * Update azure-pipelines.yml for Azure Pipelines * Update azure-pipelines.yml for Azure Pipelines * Update azure-pipelines.yml for Azure Pipelines * don't release if PR * change order
1 parent 82221b7 commit c2ad243

File tree

2 files changed

+31
-2
lines changed

2 files changed

+31
-2
lines changed

CI/devopsPack.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ $repoRoot = $($MyInvocation.MyCommand.Definition) | Split-Path | Split-Path
55
if ("$env:BUILD_REASON" -eq "PullRequest") {
66
$version = "0.0.1-alpha-pr-$env:SYSTEM_PULLREQUEST_PULLREQUESTNUMBER-$env:BUILD_BUILDNUMBER"
77
Write-Host "##vso[task.setvariable variable=ECMA2YamlNugetPush;]Yes"
8-
Write-Host "##vso[task.setvariable variable=NugetVersionType;]prerelease"
8+
Write-Host "##vso[task.setvariable variable=NugetVersionType;]PR"
99
}
1010
elseif (("$env:BUILD_REASON" -eq "Manual" -or "$env:BUILD_REASON" -eq "IndividualCI") `
1111
-and "$env:BUILD_SOURCEBRANCH" -eq 'refs/heads/develop') {

azure-pipelines.yml

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,13 +149,42 @@ steps:
149149
msbuildArguments: '-t:pack -p:PackageOutputPath=$(Build.SourcesDirectory)\_nuget\ECMAHelper -p:PackageVersion=$(CurrentPackageVersion)'
150150

151151
# Publish Nuget Package
152+
- task: GitHubRelease@1
153+
displayName: GitHub Release Offical
154+
condition: and(succeeded(), and(eq(variables['ECMA2YamlNugetPush'], 'Yes'), eq(variables['NugetVersionType'], 'release')))
155+
inputs:
156+
gitHubConnection: 'ECMA2Yaml'
157+
repositoryName: '$(Build.Repository.Name)'
158+
action: 'create'
159+
target: '$(Build.SourceVersion)'
160+
tagSource: 'userSpecifiedTag'
161+
tag: '$(CurrentPackageVersion)'
162+
assets: '$(Build.SourcesDirectory)/_nuget/ECMA2Yaml/*.nupkg'
163+
isPreRelease: false
164+
changeLogCompareToRelease: 'lastFullRelease'
165+
changeLogType: 'commitBased'
166+
- task: GitHubRelease@1
167+
displayName: GitHub Release Prerelease
168+
condition: and(succeeded(), and(eq(variables['ECMA2YamlNugetPush'], 'Yes'), eq(variables['NugetVersionType'], 'prerelease')))
169+
inputs:
170+
gitHubConnection: 'ECMA2Yaml'
171+
repositoryName: '$(Build.Repository.Name)'
172+
action: 'create'
173+
target: '$(Build.SourceVersion)'
174+
tagSource: 'userSpecifiedTag'
175+
tag: '$(CurrentPackageVersion)'
176+
assets: '$(Build.SourcesDirectory)/_nuget/ECMA2Yaml/*.nupkg'
177+
isPreRelease: true
178+
changeLogCompareToRelease: 'lastFullRelease'
179+
changeLogType: 'commitBased'
152180
- task: DotNetCoreCLI@2
153181
displayName: Nuget Publish ECMA2Yaml
154182
condition: and(succeeded(), eq(variables['ECMA2YamlNugetPush'], 'Yes'))
155183
inputs:
156184
command: 'push'
157185
packagesToPush: '$(Build.SourcesDirectory)/_nuget/ECMA2Yaml/*.nupkg'
158-
feedPublish: 'OpenPublishingService'
186+
nuGetFeedType: 'internal'
187+
publishVstsFeed: 'd3d54af3-265a-4f18-95f6-9a46397ca583/fb2f1e25-b247-417a-a19f-40ba5a96d884'
159188
- task: DotNetCoreCLI@2
160189
displayName: Nuget Publish ECMAHelper
161190
condition: and(succeeded(), eq(variables['ECMA2YamlNugetPush'], 'Yes'))

0 commit comments

Comments
 (0)