Skip to content

Commit

Permalink
Add a retry mechanism for publishing mmtk-core to crates.io (#618)
Browse files Browse the repository at this point in the history
  • Loading branch information
qinsoon authored Aug 8, 2022
1 parent af2bfe7 commit 89a6f4a
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion .github/workflows/cargo-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,15 @@ jobs:
- name: Publish sub crates
run: |
cargo publish --manifest-path=macros/Cargo.toml
# Publish MMTk core.
# As mmtk-core depends on the crate we just publish above, in practice there could be
# a delay before we can find the exact version for the dependent crate on crates.io.
# The script will retry publish for 5 times with 60 seconds between the retries.
- name: Public mmtk-core
run: |
cargo publish
for n in {1..5}; do
echo "Attempt #"$n
cargo publish && break
echo "Wait for Retry #"$n
sleep 60
done

0 comments on commit 89a6f4a

Please sign in to comment.