diff --git a/.github/workflows/cron-update-rustc.yml b/.github/workflows/cron-update-rustc.yml index 98c6212..d206f41 100644 --- a/.github/workflows/cron-update-rustc.yml +++ b/.github/workflows/cron-update-rustc.yml @@ -14,10 +14,10 @@ jobs: run: | set -x # Extract the date from whatever version of the compiler dtolnay/rust-toolchain gives us. - RUSTC_DATE=$(rustc --verbose --version | sed -ne 's/^commit-date: //p') + RUSTC_VERSION=$(rustc --verbose --version | sed -ne 's/^release: //p') # Update the version in the reference file. - echo "stable-${RUSTC_DATE}" > rustc-stable-version - echo "rustc_date=${RUSTC_DATE}" >> $GITHUB_ENV + echo "${RUSTC_VERSION}" > rustc-version + echo "rustc_version=${RUSTC_VERSION}" >> $GITHUB_ENV # In case of no new version don't make an empty PR. if ! git diff --exit-code > /dev/null; then echo "Updated rustc. Opening PR." @@ -30,10 +30,11 @@ jobs: if: env.changes_made == 'true' uses: peter-evans/create-pull-request@v6 with: + token: ${{ secrets.CREATE_PR_TOKEN }} author: Update Rustc Bot committer: Update Rustc Bot - title: Automated weekly update to rustc (to stable-${{ env.rustc_date }}) + title: Automated weekly update to rustc (to ${{ env.rustc_version }}) body: | Automated update to Github CI workflow `rust.yml` by [create-pull-request](https://github.com/peter-evans/create-pull-request) GitHub action - commit-message: Automated update to Github CI to rustc stable-${{ env.rustc_date }} + commit-message: Automated update to Github CI to rustc ${{ env.rustc_version }} branch: create-pull-request/weekly-stable-update diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 578dd6f..01a4383 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -19,7 +19,7 @@ jobs: uses: actions/checkout@v4 - name: "Read rustc version" id: read_toolchain - run: echo "rustc_version=$(cat rustc-stable-version)" >> $GITHUB_OUTPUT + run: echo "rustc_version=$(cat rustc-version)" >> $GITHUB_OUTPUT Build: runs-on: ubuntu-latest @@ -32,6 +32,7 @@ jobs: run: cargo build Clippy: + needs: Prepare runs-on: ubuntu-latest steps: - name: "Checkout" diff --git a/rustc-stable-version b/rustc-stable-version deleted file mode 100644 index f42213b..0000000 --- a/rustc-stable-version +++ /dev/null @@ -1 +0,0 @@ -stable-2024-06-10 diff --git a/rustc-version b/rustc-version new file mode 100644 index 0000000..5422724 --- /dev/null +++ b/rustc-version @@ -0,0 +1 @@ +1.78.0