Files
Ee Durbin c3813a501f add a workflow for preparing releases (#28486)
this is primarily useful for testing the sts token exchange in a
non-load bearing environment ahead of merging #28484
, but may be useful for maintainers :)

`automations` environment has been created and `STS_API_URL` secret set
2026-09-10 10:44:26 -04:00

32 lines
932 B
Bash
Executable File

#!/usr/bin/env bash
# Prepare for a release
#
# All additional options are passed to `rooster release`
set -eu
export UV_DEFAULT_INDEX='https://pypi.org/simple'
script_root="$(realpath "$(dirname "$0")")"
project_root="$(dirname "$script_root")"
echo "Updating metadata with rooster..."
cd "$project_root"
uv run --locked --python 3.12 --only-group release \
rooster release "$@"
# Bump internal crate versions
uv run --script "$project_root/scripts/bump-workspace-crate-versions.py"
echo "Updating crate READMEs..."
uv run --script "$project_root/scripts/generate-crate-readmes.py"
echo "Updating lockfiles..."
cargo update -p ruff
uv lock --no-locked
echo "Checking crates.io publish setup..."
crates_policies="$(mktemp -d)"
trap 'rm -rf "$crates_policies"' EXIT
git clone --depth=1 --quiet https://github.com/astral-sh/crates-policies.git "$crates_policies"
uv run --script "$crates_policies/check.py" "$project_root"