Skip to content

Commit ad4d0c2

Browse files
committed
(GH-31 GH-30) MyGet and Nuget Changes
- Added MyGet Feeds for deployment of Develop and Master branches - Added Nuget Feed Details and access rights - Added nuget.org deployment for the GitHubReleaseManager DLL
1 parent 5d4664b commit ad4d0c2

File tree

2 files changed

+40
-11
lines changed

2 files changed

+40
-11
lines changed

BuildScripts/default.ps1

Lines changed: 21 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,7 @@ Task -Name DeployDevelopSolutionToMyGet -Depends InspectCodeForProblems, DeployD
393393

394394
Task -Name DeployMasterSolutionToMyGet -Depends InspectCodeForProblems, DeployMasterPackageToMyGet -Description "Complete build, including creation of Chocolatey Package and Deployment to MyGet.org"
395395

396-
Task -Name DeploySolutionToChocolatey -Depends InspectCodeForProblems, DeployPackageToChocolatey -Description "Complete build, including creation of Chocolatey Package and Deployment to Chocolatey.org."
396+
Task -Name DeploySolutionToChocolatey -Depends InspectCodeForProblems, DeployPackageToChocolateyAndNuget -Description "Complete build, including creation of Chocolatey Package and Deployment to Chocolatey.org."
397397

398398
# build tasks
399399

@@ -619,8 +619,10 @@ Task -Name DeployDevelopPackageToMyGet -Description "Takes the packaged Chocolat
619619
try {
620620
Write-Output "Deploying to MyGet..."
621621

622-
exec {
623-
& $nugetExe push "$buildArtifactsDirectory\*.nupkg" $env:MyGetDevelopApiKey -source $env:MyGetDevelopFeedUrl
622+
exec {
623+
Get-ChildItem $buildArtifactsDirectory -Filter *.nupkg | Foreach-Object {
624+
& $nugetExe push $_ $env:MyGetDevelopApiKey -source $env:MyGetDevelopFeedUrl
625+
}
624626
}
625627

626628
Write-Output ("************ MyGet Deployment Successful ************")
@@ -637,8 +639,10 @@ Task -Name DeployMasterPackageToMyGet -Description "Takes the packaged Chocolate
637639
try {
638640
Write-Output "Deploying to MyGet..."
639641

640-
exec {
641-
& $nugetExe push "$buildArtifactsDirectory\*.nupkg" $env:MyGetMasterApiKey -source $env:MyGetMasterFeedUrl
642+
exec {
643+
Get-ChildItem $buildArtifactsDirectory -Filter *.nupkg | Foreach-Object {
644+
& $nugetExe push $_ $env:MyGetMasterApiKey -source $env:MyGetMasterFeedUrl
645+
}
642646
}
643647

644648
Write-Output ("************ MyGet Deployment Successful ************")
@@ -649,20 +653,26 @@ Task -Name DeployMasterPackageToMyGet -Description "Takes the packaged Chocolate
649653
}
650654
}
651655

652-
Task -Name DeployPackageToChocolatey -Description "Takes the packaged Chocolatey package and deploys to Chocolatey.org" -Action {
656+
Task -Name DeployPackageToChocolateyAndNuget -Description "Takes the packages and deploys to Chocolatey.org and nuget.org" -Action {
653657
$buildArtifactsDirectory = get-buildArtifactsDirectory;
654658

655659
try {
656-
Write-Output "Deploying to Chocolatey..."
660+
Write-Output "Deploying to Chocolatey and Nuget..."
657661

658-
exec {
659-
& $nugetExe push "$buildArtifactsDirectory\*.nupkg" $env:ChocolateyApiKey -source $env:ChocolateyFeedUrl
662+
exec {
663+
Get-ChildItem $buildArtifactsDirectory -Filter *.nupkg | Foreach-Object {
664+
if(&_ -like '*cli*') {
665+
& $nugetExe push $_ $env:ChocolateyApiKey -source $env:ChocolateyFeedUrl
666+
} else {
667+
& $nugetExe push $_ $env:NugetApiKey -source $env:NugetFeedUrl
668+
}
669+
}
660670
}
661671

662-
Write-Output ("************ Chocolatey Deployment Successful ************")
672+
Write-Output ("************ Chocolatey and Nuget Deployment Successful ************")
663673
}
664674
catch {
665675
Write-Error $_
666-
Write-Output ("************ Chocolatey Deployment Failed ************")
676+
Write-Output ("************ Chocolatey and Nuget Deployment Failed ************")
667677
}
668678
}

appveyor.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,25 @@ branches:
1616

1717
# clone directory
1818
clone_folder: C:\projects\GitHubReleaseManager
19+
20+
# environment variables
21+
environment:
22+
MyGetDevelopApiKey:
23+
secure: CSkz9zxSF7/W9k7MxR0WD3J2q2PU07QkxrlT71yAkMLMECQBsbTHx3HSajNPgTxI
24+
MyGetDevelopFeedUrl: https://www.myget.org/F/ghrm_develop/
25+
MyGetMasterApiKey:
26+
secure: 8YUXM0dwbOFIAwjrbZoYxT/cpnL1J7CKD85kUjSyzZQpcRxpNxKcUtr+0gjj+LBN
27+
MyGetMasterFeedUrl: https://www.myget.org/F/ghrm_master/
28+
ChocolateyApiKey:
29+
secure: 2Sbie8uhFjl1v+NtLuR1oGcWnQE2M87jq0fSEwFOYcnNEC5qdwCkgVOG0MmC2Ffv
30+
ChocolateyFeedUrl: https://chocolatey.org/
31+
NugetApiKey:
32+
secure: a/xbTgIAc+QGdAwANmenmrUJFG5hqB+jMyqB6y80KZYXfRHOVEB+1dB4CEyDednf
33+
NugetFeedUrl: https://nuget.org/
34+
GitHubUserName:
35+
secure: 9zbEIVfl69s/qhei6qkdeA==
36+
GitHubPassword:
37+
secure: XSuLygmr83zEpWcXIXMXGocN0QbooLud1eIMA3mQWKkT9LAU4TyrijLBcJIo7bD7
1938

2039
#---------------------------------#
2140
# build configuration #

0 commit comments

Comments
 (0)