diff --git a/.github/workflows/_buildpacks-release.yml b/.github/workflows/_buildpacks-release.yml index 16230981..51af59e2 100644 --- a/.github/workflows/_buildpacks-release.yml +++ b/.github/workflows/_buildpacks-release.yml @@ -75,10 +75,16 @@ jobs: - name: Rust cache uses: Swatinem/rust-cache@v2.6.2 + # the version of `libcnb-cargo` installed here is kept in sync with the version of `libcnb-package` + # that the release automation CLI tooling depends on - name: Install libcnb-cargo - # TODO: Derive this version from the `libcnb-package` version in this repo's `Cargo.toml`, - # or at least add a CI check to ensure the two versions are in sync. - run: cargo install --locked libcnb-cargo@0.13.0 + run: | + LOCKFILE_URL="https://raw.githubusercontent.com/heroku/languages-github-actions/${{ inputs.languages_cli_branch }}/Cargo.lock" + LIBCNB_PACKAGE_VERSION=$( \ + curl --silent --show-error --fail --retry 5 --retry-all-errors --connect-timeout 10 --max-time 60 "${LOCKFILE_URL}" \ + | yq -ptoml -oyaml '.package[] | select(.name == "libcnb-package") | .version' \ + ) + cargo install --locked "libcnb-cargo@${LIBCNB_PACKAGE_VERSION}" - name: Install Languages CLI uses: heroku/languages-github-actions/.github/actions/install-languages-cli@main diff --git a/Cargo.toml b/Cargo.toml index dfb9cae7..ca7a7813 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -25,7 +25,6 @@ clap = { version = "4", default-features = false, features = [ ] } indexmap = "2" lazy_static = "1" -# NB: Make sure to keep the `libcnb-cargo` version in `_buildpacks-release.yml` in sync with these. libcnb-data = "=0.13.0" libcnb-package = "=0.13.0" markdown = "1.0.0-alpha.12"