Skip to content

Commit 8f4146d

Browse files
committed
ci: Wait for the crates.io index to propagate
1 parent e385026 commit 8f4146d

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

.github/workflows/rust.yaml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,14 +192,24 @@ jobs:
192192
uses: actions-rs/cargo@v1
193193
with:
194194
command: publish
195-
args: --no-verify -p matrix-http-rendezvous
195+
args: -p matrix-http-rendezvous
196196
env:
197197
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
198198

199+
- name: Try publishing (dry-run) a few times, waiting for the index to propagate
200+
run: |
201+
for i in $(seq 1 30); do
202+
if cargo publish --no-verify --dry-run -p matrix-http-rendezvous-server; then
203+
break
204+
fi
205+
echo "Attempt $i failed, retrying in 10s"
206+
sleep 10
207+
done
208+
199209
- name: Publish matrix-http-rendezvous-server on crates.io
200210
uses: actions-rs/cargo@v1
201211
with:
202212
command: publish
203-
args: --no-verify -p matrix-http-rendezvous-server
213+
args: -p matrix-http-rendezvous-server
204214
env:
205215
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}

0 commit comments

Comments
 (0)