diff --git a/.github/workflows/update-rust.yml b/.github/workflows/update-rust.yml index a92e552c6fb..e7e0f050de7 100644 --- a/.github/workflows/update-rust.yml +++ b/.github/workflows/update-rust.yml @@ -6,6 +6,10 @@ on: # check for new rust versions weekly - cron: '30 3 * * FRI' workflow_dispatch: + push: + branches: + # The development branch for this workflow: + - "update-rust" jobs: rust-update: runs-on: ubuntu-latest @@ -13,13 +17,14 @@ jobs: - uses: actions/checkout@v3 # First, check rust GitHub releases for a new version. We assume that the # latest version's tag name is the version. + - name: Install yq + run: sudo snap install yq - name: Check new rust version id: update run: | current_rust_version=$(cat ./rust-toolchain.toml | sed -n 's/^channel[[:space:]]*=[[:space:]]"\(.*\)"/\1/p') echo "current rust version '$current_rust_version'" - release_data=$(curl --silent -H 'Accept: application/vnd.github.v3+json' https://api.github.com/repos/rust-lang/rust/releases/latest) - latest_rust_version=$(echo -n "$release_data" | jq -cMr .tag_name) + latest_rust_version=$(curl -sSL https://static.rust-lang.org/dist/channel-rust-stable.toml | yq -p toml -oy .pkg.rust.version | awk '{print $1}') # The GitHub API has some hiccups, so we check the value before going further if [ -z "$latest_rust_version" ] || [ "$latest_rust_version" = "null" ] diff --git a/CHANGELOG-Nns-Dapp.md b/CHANGELOG-Nns-Dapp.md index 36f01971242..988330c112f 100644 --- a/CHANGELOG-Nns-Dapp.md +++ b/CHANGELOG-Nns-Dapp.md @@ -45,6 +45,7 @@ The NNS Dapp is released through proposals in the Network Nervous System. Theref #### Added #### Changed +* Fix the rust-update action. * Specify the `snsdemo` version in `dfx.json`. * Make the file list stats accessible in logs and as a file in the release artefacts. * Support using the nns-dapp downgrade-upgrade test with Wasms other than prod.