From df6378ba584ac30eb049e7f5e90c45a6d0423b26 Mon Sep 17 00:00:00 2001 From: Scott Date: Tue, 30 Jan 2024 13:03:07 -0500 Subject: [PATCH] ci: adding in steps to regenerate the Cargo.lock file --- .github/workflows/release.yml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ae90f85..cdb997b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -19,7 +19,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: ref: ${{ github.sha }} fetch-depth: 0 @@ -37,12 +37,18 @@ jobs: branch: update-from-${{ github.sha }} - name: update cargo.toml run: | - appversion=$(echo "${{ steps.version-bump.outputs.new_tag }}" | sed 's/[v]//') + appversion=$(echo "${{ steps.version-bump.outputs.new_tag }}" | grep -oE '[0-9]+\.[0-9]+\.[0-9]+') sed -i -e "s/^version = .*/version = \"$appversion\"/" Cargo.toml + - uses: actions/checkout@v4 + - run: rustup toolchain install stable --profile minimal + - uses: actions/checkout@v4 + - run: rustup update stable && rustup default stable + - name: regenerate cargo.lock + run: cargo generate-lockfile - name: auto commit uses: stefanzweifel/git-auto-commit-action@v5 with: - commit_message: "[skip ci] update Cargo.toml to ${{ steps.version-bump.outputs.new_tag }}" + commit_message: "[skip ci] updating app version to ${{ steps.version-bump.outputs.new_tag }}" branch: update-from-${{ github.sha }} # create PR using GitHub CLI - name: create PR with update info