From 0ebecb6861e2364454ee708ccca3b24357c76b46 Mon Sep 17 00:00:00 2001 From: eitsupi Date: Sat, 29 Jul 2023 08:44:57 +0000 Subject: [PATCH] ci: use cargo metadata and jq to extract the version number --- .github/set_version.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/set_version.sh b/.github/set_version.sh index 3804a9e7c98f..fb6926503c22 100755 --- a/.github/set_version.sh +++ b/.github/set_version.sh @@ -2,4 +2,4 @@ # since the caches seem to accumulate cruft over time; # ref https://github.com/PRQL/prql/pull/2407 -grep '^version =' Cargo.toml | tr -d ' "' >> $GITHUB_ENV +echo "version=$(cargo metadata --format-version=1 --no-deps | jq -r '.packages[0].version')" >>"$GITHUB_ENV"