Skip to content

Commit a0c327b

Browse files
committed
Do not retry on 403
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
1 parent a87ea57 commit a0c327b

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

.github/workflows/ci.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,16 @@ jobs:
4949
env:
5050
GH_TOKEN: ${{ github.token }}
5151
shell: bash
52-
run: |
53-
until dotnet nuget push 'build/output/*.nupkg' -k "$GH_TOKEN" --skip-duplicate --no-symbols true; do echo "Retrying"; sleep 1; done;
52+
run: |
53+
: publish to github package repository
54+
log=$(mktemp)
55+
until dotnet nuget push 'build/output/*.nupkg' -k "$GH_TOKEN" --skip-duplicate --no-symbols true | tee "$log"; do
56+
if grep --color=always '403 (Forbidden)' "$log"; then
57+
exit 1
58+
fi
59+
echo "Retrying"
60+
sleep 1
61+
done
5462
5563
- name: Generate release notes for tag
5664
if: github.event_name == 'push' && startswith(github.ref, 'refs/tags')

0 commit comments

Comments
 (0)