From 1cf5a23c94ef0cf4420acf52d2bbfbc6089b26fd Mon Sep 17 00:00:00 2001 From: Marius Lie Winger Date: Mon, 2 Sep 2024 16:04:39 +0200 Subject: [PATCH] fix: ensure uv.lock is updated on release --- .github/workflows/create-release-pr.yaml | 30 ++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/.github/workflows/create-release-pr.yaml b/.github/workflows/create-release-pr.yaml index c01caeca..c4e20df0 100644 --- a/.github/workflows/create-release-pr.yaml +++ b/.github/workflows/create-release-pr.yaml @@ -20,3 +20,33 @@ jobs: outputs: release_created: ${{ steps.release.outputs.release_created }} tag_name: ${{ steps.release.outputs.tag_name }} + + update-uv-lock-file: + runs-on: ubuntu-latest + needs: release-please + if: needs.release-please.outputs.release_created + steps: + - name: Checkout repository + if: ${{ steps.release.outputs.release_created }} + uses: actions/checkout@v4 + + - name: Update uv.lock file + if: ${{ steps.release.outputs.release_created }} + run: | + pipx install uv + cd api + uv lock --upgrade-package api + + - name: Set git config to github action user + if: ${{ steps.release.outputs.release_created }} + run: | + git config user.name "github-actions[bot]" + git config user.email "41898282+github-actions[bot]@users.noreply.github.com" + git status + + - name: Commit and push updated uv.lock file + if: ${{ steps.release.outputs.release_created }} + run: | + git add uv.lock + git commit -m "chore: update version in uv.lock" + git push