mirror of
https://github.com/lancedikson/bowser
synced 2026-02-10 01:50:10 +00:00
fix: attemp to resolve NPM publish issues
This commit is contained in:
parent
8f9badd27f
commit
e2318ef12d
21
.github/workflows/publish.yml
vendored
21
.github/workflows/publish.yml
vendored
@ -43,23 +43,4 @@ jobs:
|
||||
- run: npm version $RELEASE_VERSION --no-git-tag-version
|
||||
- run: npm run build
|
||||
- name: Publish to npm
|
||||
run: |
|
||||
max_attempts=5
|
||||
attempt=1
|
||||
while [ $attempt -le $max_attempts ]; do
|
||||
echo "Attempt $attempt of $max_attempts..."
|
||||
if npm publish --access public; then
|
||||
echo "Successfully published!"
|
||||
break
|
||||
else
|
||||
if [ $attempt -eq $max_attempts ]; then
|
||||
echo "Failed to publish after $max_attempts attempts"
|
||||
exit 1
|
||||
fi
|
||||
echo "Publish failed, waiting before retry..."
|
||||
sleep_time=$((attempt * 30))
|
||||
echo "Waiting ${sleep_time} seconds before retry..."
|
||||
sleep $sleep_time
|
||||
attempt=$((attempt + 1))
|
||||
fi
|
||||
done
|
||||
run: npm publish
|
||||
Loading…
Reference in New Issue
Block a user