Skip to content

MMTk 0.29.0

MMTk 0.29.0 #29

Workflow file for this run

name: Publish to crates.io
on:
# Triggered when we tag a release (including a prerelease)
release:
types: [published]
concurrency:
# Cancels pending runs when a PR gets updated.
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
cargo-publish:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
# Show the Rust toolchain we are actually using
- run: rustup show
- run: cargo --version
- name: Cargo login
run: cargo login ${{ secrets.CI_CARGO_LOGIN }}
- 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: |
success=false
for n in {1..5}; do
echo "Attempt #"$n
cargo publish && { success=true; break; }
echo "Wait for Retry #"$n
sleep 60
done
if [ "$success" = false ]; then
echo "All attempts to publish failed."
exit 1
fi