diff --git a/.github/actions/ci-shared-setup/action.yml b/.github/actions/ci-shared-setup/action.yml index f0c49e6c..71da368c 100644 --- a/.github/actions/ci-shared-setup/action.yml +++ b/.github/actions/ci-shared-setup/action.yml @@ -25,12 +25,17 @@ runs: ${{ runner.os }}-cargo-target-${{ hashFiles('Cargo.toml') }} ${{ runner.os }}-cargo-target + - name: Read wasmtime version + id: wasmtime_version + shell: bash + run: | + VERSION=$(cargo metadata --format-version=1 --locked | jq '.packages[] | select(.name == "wasmtime") | .version' -r) + echo "::set-output name=wasmtime_version::$VERSION" + - name: Install wasmtime-cli - env: - WASMTIME_VERSION: 8.0.0 shell: bash run: | - wget -nv 'https://github.com/bytecodealliance/wasmtime/releases/download/v${{ env.WASMTIME_VERSION }}/wasmtime-v${{ env.WASMTIME_VERSION }}-x86_64-${{ inputs.os }}.tar.xz' -O /tmp/wasmtime.tar.xz + wget -nv 'https://github.com/bytecodealliance/wasmtime/releases/download/v${{ steps.wasmtime_version.outputs.wasmtime_version }}/wasmtime-v${{ steps.wasmtime_version.outputs.wasmtime_version }}-x86_64-${{ inputs.os }}.tar.xz' -O /tmp/wasmtime.tar.xz mkdir /tmp/wasmtime tar xvf /tmp/wasmtime.tar.xz --strip-components=1 -C /tmp/wasmtime echo "/tmp/wasmtime" >> $GITHUB_PATH