Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .github/workflows/dev-publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,12 @@ jobs:
git-date: ${{ steps.versions.outputs.git-date }}
steps:
- uses: actions/checkout@v6
- uses: actions-rust-lang/setup-rust-toolchain@v1
- name: Resolve versions
id: versions
run: |
set -euo pipefail

echo "rust-version=$(cargo --version | cut -d' ' -f2)" | tee -a "${GITHUB_OUTPUT}"
echo "rust-version=$(yq -r '.toolchain.channel' rust-toolchain.toml)" | tee -a "${GITHUB_OUTPUT}"
git_ref=$(gh api repos/bytecodealliance/wasmtime/git/${{ inputs.git-ref || 'ref/tags/dev' }} --template '{{.object.sha}}')
git_date=$(gh api repos/bytecodealliance/wasmtime/commits/${git_ref} --template '{{.commit.committer.date}}')
echo "git-ref=${git_ref}" | tee -a "${GITHUB_OUTPUT}"
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/manual-publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,12 @@ jobs:
additional-tags: ${{ steps.versions.outputs.additional-tags }}
steps:
- uses: actions/checkout@v6
- uses: actions-rust-lang/setup-rust-toolchain@v1
- name: Resolve versions
id: versions
run: |
set -euo pipefail

echo "rust-version=$(cargo --version | cut -d' ' -f2)" | tee -a "${GITHUB_OUTPUT}"
echo "rust-version=$(yq -r '.toolchain.channel' rust-toolchain.toml)" | tee -a "${GITHUB_OUTPUT}"
# convert space delimited to new-line delimited
echo 'additional-tags<<EOF' >> $GITHUB_OUTPUT
echo $(echo "${{ inputs.additional-tags }}" | perl -pe 's/\s+/\n/g') >> $GITHUB_OUTPUT
Expand Down
11 changes: 5 additions & 6 deletions .github/workflows/pull-request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ jobs:
common-changed: ${{ steps.filter.outputs.common }}
steps:
- uses: actions/checkout@v6
- uses: actions-rust-lang/setup-rust-toolchain@v1
- uses: dorny/paths-filter@v3
id: filter
with:
Expand All @@ -45,16 +44,16 @@ jobs:
run: |
set -euo pipefail

echo "rust-version=$(cargo --version | cut -d' ' -f2)" | tee -a "${GITHUB_OUTPUT}"
echo "rust-version=$(yq -r '.toolchain.channel' rust-toolchain.toml)" | tee -a "${GITHUB_OUTPUT}"

# latest
echo "wasmtime-latest-version=$(cd versions/latest ; cargo metadata --format-version 1 | jq -r '.packages[] | select(.name=="wasmtime-cli") | .version')" | tee -a "${GITHUB_OUTPUT}"
echo "wasmtime-latest-version=$(cd versions/latest ; yq -p toml -oj -r '.package[] | select(.name == "wasmtime-cli") | .version' Cargo.lock)" | tee -a "${GITHUB_OUTPUT}"
# latest minus 1
echo "wasmtime-latest-1-version=$(cd versions/latest-1 ; cargo metadata --format-version 1 | jq -r '.packages[] | select(.name=="wasmtime-cli") | .version')" | tee -a "${GITHUB_OUTPUT}"
echo "wasmtime-latest-1-version=$(cd versions/latest-1 ; yq -p toml -oj -r '.package[] | select(.name == "wasmtime-cli") | .version' Cargo.lock)" | tee -a "${GITHUB_OUTPUT}"
# lts
echo "wasmtime-lts-version=$(cd versions/lts ; cargo metadata --format-version 1 | jq -r '.packages[] | select(.name=="wasmtime-cli") | .version')" | tee -a "${GITHUB_OUTPUT}"
echo "wasmtime-lts-version=$(cd versions/lts ; yq -p toml -oj -r '.package[] | select(.name == "wasmtime-cli") | .version' Cargo.lock)" | tee -a "${GITHUB_OUTPUT}"
# lts minus 1
echo "wasmtime-lts-1-version=$(cd versions/lts-1 ; cargo metadata --format-version 1 | jq -r '.packages[] | select(.name=="wasmtime-cli") | .version')" | tee -a "${GITHUB_OUTPUT}"
echo "wasmtime-lts-1-version=$(cd versions/lts-1 ; yq -p toml -oj -r '.package[] | select(.name == "wasmtime-cli") | .version' Cargo.lock)" | tee -a "${GITHUB_OUTPUT}"

publish:
name: Publish
Expand Down
11 changes: 5 additions & 6 deletions .github/workflows/push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,34 +27,33 @@ jobs:
wasmtime-lts-1-version-minor: ${{ steps.versions.outputs.wasmtime-lts-1-version-minor }}
steps:
- uses: actions/checkout@v6
- uses: actions-rust-lang/setup-rust-toolchain@v1
- name: Resolve versions
id: versions
run: |
set -euo pipefail

echo "rust-version=$(cargo --version | cut -d' ' -f2)" | tee -a "${GITHUB_OUTPUT}"
echo "rust-version=$(yq -r '.toolchain.channel' rust-toolchain.toml)" | tee -a "${GITHUB_OUTPUT}"

# latest
wasmtime_latest_version="$(cd versions/latest ; cargo metadata --format-version 1 | jq -r '.packages[] | select(.name=="wasmtime-cli") | .version')"
wasmtime_latest_version="$(cd versions/latest ; yq -p toml -oj -r '.package[] | select(.name == "wasmtime-cli") | .version' Cargo.lock)"
echo "wasmtime-latest-version=${wasmtime_latest_version}" | tee -a "${GITHUB_OUTPUT}"
echo "wasmtime-latest-version-major=$(echo "${wasmtime_latest_version}" | cut -d. -f1)" | tee -a "${GITHUB_OUTPUT}"
echo "wasmtime-latest-version-minor=$(echo "${wasmtime_latest_version}" | cut -d. -f1-2)" | tee -a "${GITHUB_OUTPUT}"

# latest minus 1
wasmtime_latest_1_version="$(cd versions/latest-1 ; cargo metadata --format-version 1 | jq -r '.packages[] | select(.name=="wasmtime-cli") | .version')"
wasmtime_latest_1_version="$(cd versions/latest-1 ; yq -p toml -oj -r '.package[] | select(.name == "wasmtime-cli") | .version' Cargo.lock)"
echo "wasmtime-latest-1-version=${wasmtime_latest_1_version}" | tee -a "${GITHUB_OUTPUT}"
echo "wasmtime-latest-1-version-major=$(echo "${wasmtime_latest_1_version}" | cut -d. -f1)" | tee -a "${GITHUB_OUTPUT}"
echo "wasmtime-latest-1-version-minor=$(echo "${wasmtime_latest_1_version}" | cut -d. -f1-2)" | tee -a "${GITHUB_OUTPUT}"

# lts
wasmtime_lts_version="$(cd versions/lts ; cargo metadata --format-version 1 | jq -r '.packages[] | select(.name=="wasmtime-cli") | .version')"
wasmtime_lts_version="$(cd versions/lts ; yq -p toml -oj -r '.package[] | select(.name == "wasmtime-cli") | .version' Cargo.lock)"
echo "wasmtime-lts-version=${wasmtime_lts_version}" | tee -a "${GITHUB_OUTPUT}"
echo "wasmtime-lts-version-major=$(echo "${wasmtime_lts_version}" | cut -d. -f1)" | tee -a "${GITHUB_OUTPUT}"
echo "wasmtime-lts-version-minor=$(echo "${wasmtime_lts_version}" | cut -d. -f1-2)" | tee -a "${GITHUB_OUTPUT}"

# lts minus 1
wasmtime_lts_1_version="$(cd versions/lts-1 ; cargo metadata --format-version 1 | jq -r '.packages[] | select(.name=="wasmtime-cli") | .version')"
wasmtime_lts_1_version="$(cd versions/lts-1 ; yq -p toml -oj -r '.package[] | select(.name == "wasmtime-cli") | .version' Cargo.lock)"
echo "wasmtime-lts-1-version=${wasmtime_lts_1_version}" | tee -a "${GITHUB_OUTPUT}"
echo "wasmtime-lts-1-version-major=$(echo "${wasmtime_lts_1_version}" | cut -d. -f1)" | tee -a "${GITHUB_OUTPUT}"
echo "wasmtime-lts-1-version-minor=$(echo "${wasmtime_lts_1_version}" | cut -d. -f1-2)" | tee -a "${GITHUB_OUTPUT}"
Expand Down
Loading