Parse Julia version
Python
Use pathlib to read and tomllib to parse julia_version from Manifest.toml. (requires Python >= 3.11)
import tomllib; from pathlib import Path; print(tomllib.loads(Path("Manifest.toml").read_text())["julia_version"])And it’s easy to run in a bash shell,
python -c 'import tomllib; from pathlib import Path; print(tomllib.loads(Path("Manifest.toml").read_text())["julia_version"])'In GitHub actions,
echo "resolved=$(python -c 'import tomllib; from pathlib import Path; print(tomllib.loads(Path("Manifest.toml").read_text())["julia_version"])')" >> "$GITHUB_OUTPUT"Bash
Use awk to parse julia_version from Manifest.toml.
echo "resolved=$(awk -F '"' '/^[[:space:]]*julia_version/ {print $2}' Manifest.toml)" >> "$GITHUB_OUTPUT"Last updated on