Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 18 additions & 1 deletion .github/workflows/Release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,21 @@ jobs:
- name: Publish app into nuget.org
env:
NUGET_API_KEY: ${{ secrets.QUANTORI_NUGET_API_KEY }}
run: dotnet nuget push ./Behavioral.Automation.${{ env.VER }}.nupkg -s "https://api.nuget.org/v3/index.json" -k "$NUGET_API_KEY" --skip-duplicate
run: |
output=$(dotnet nuget push ./Behavioral.Automation.${{ env.VER }}.nupkg -s "https://api.nuget.org/v3/index.json" -k "$NUGET_API_KEY" --skip-duplicate 2>&1) || exit_code=$?

if [ -z "$exit_code" ]; then exit_code=0; fi

echo "$output"
echo "Exit Code: $exit_code"

if echo "$output" | grep -q "403"; then
echo "Error: NuGet API key is invalid or expired. Please contact Quantori support to renew the key. For more details, refer to the Quantori BDD Confluence page called 'Renew NuGet API key'."
exit 1
elif [ $exit_code -ne 0 ]; then
echo "Error: dotnet nuget push failed with exit code $exit_code. Check the logs for more details."
exit $exit_code
else
echo "Package successfully published to NuGet.org."
fi

Loading