File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change 1111 - uses : dawidd6/action-homebrew-bump-formula@v3.8.0
1212 with :
1313 # GitHub token, required, not the default one
14- token : ${{secrets.HOMEBREW_GITHUB_TOKEN }}
14+ token : ${{secrets.RELEASE_GITHUB_TOKEN }}
1515 # Formula name, required
1616 formula : gitversion
1717 tag : ${{ github.event.client_payload.ref }}
Original file line number Diff line number Diff line change @@ -37,6 +37,10 @@ public override void Run(BuildContext context)
3737 if ( context . IsGitHubActionsBuild && context . IsOnMainBranchOriginalRepo )
3838 {
3939 var apiKey = context . Credentials ? . GitHub ? . Token ;
40+ if ( string . IsNullOrEmpty ( apiKey ) )
41+ {
42+ throw new InvalidOperationException ( "Could not resolve NuGet GitHub Packages API key." ) ;
43+ }
4044 PublishToNugetRepo ( context , apiKey , Constants . GithubPackagesUrl ) ;
4145 }
4246 // publish to nuget.org for stable releases
@@ -51,7 +55,7 @@ public override void Run(BuildContext context)
5155 PublishToNugetRepo ( context , apiKey , Constants . NugetOrgUrl ) ;
5256 }
5357 }
54- private static void PublishToNugetRepo ( BuildContext context , string ? apiKey , string ? apiUrl )
58+ private static void PublishToNugetRepo ( BuildContext context , string apiKey , string apiUrl )
5559 {
5660 var nugetVersion = context . Version ! . NugetVersion ;
5761 foreach ( var ( packageName , filePath , _) in context . Packages . Where ( x => ! x . IsChocoPackage ) )
You can’t perform that action at this time.
0 commit comments