From d1acf720cc5741ef3b69f654d7bcba6c679a5a20 Mon Sep 17 00:00:00 2001 From: Lucas Alves Date: Fri, 8 Nov 2024 08:49:23 -0300 Subject: [PATCH] feat: dynamic lib version using pyproject --- .github/workflows/release.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index bb430f34..574aca26 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -25,6 +25,30 @@ jobs: - name: Print Version run: echo "Bumped to version ${{ steps.cz.outputs.version }}" + - name: Install Poetry + run: | + curl -sSL https://install.python-poetry.org | python3 - + export PATH="$HOME/.local/bin:$PATH" + + - name: Update Poetry version in pyproject.toml + run: | + git config --global user.name "github-actions[bot]" + git config --global user.email "github-actions[bot]@users.noreply.github.com" + poetry version "${{ steps.cz.outputs.version }}" + git add pyproject.toml + git commit -m "Update pyproject.toml to version ${{ steps.cz.outputs.version }}" + git push + + - name: Update poetry.lock + run: | + git config --global user.name "github-actions[bot]" + git config --global user.email "github-actions[bot]@users.noreply.github.com" + poetry lock + git add poetry.lock + git commit -m "Update poetry.lock for version ${{ steps.cz.outputs.version }}" + git push + + release: name: Release needs: version