Skip to content

Commit

Permalink
Fail if nuget_key is not found
Browse files Browse the repository at this point in the history
  • Loading branch information
joshuaboniface committed Mar 7, 2024
1 parent 8983e61 commit 1ac8187
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions build.py
Original file line number Diff line number Diff line change
Expand Up @@ -491,6 +491,10 @@ def build_nuget(
nuget_repo = configurations["nuget"]["feed_urls"]["stable"]
nuget_key = getenv("NUGET_STABLE_KEY")

if nuget_key is None:
log(f"Error: Failed to get NUGET_*_KEY environment variable")
exit(1)

push_command = f"dotnet nuget push out/nuget/*.nupkg -s {nuget_repo} -k {nuget_key}"
log(f">>>> {push_command}")
os.system(push_command)
Expand Down

0 comments on commit 1ac8187

Please sign in to comment.