From b5e2d742d15c2acdafe1efa9a7cadd0a01f496de Mon Sep 17 00:00:00 2001 From: Mike Waites Date: Sun, 14 May 2023 20:31:49 +0100 Subject: [PATCH] Extract version from pyproject.toml --- .github/workflows/release-drafter.yml | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release-drafter.yml b/.github/workflows/release-drafter.yml index b57a121..49c50da 100644 --- a/.github/workflows/release-drafter.yml +++ b/.github/workflows/release-drafter.yml @@ -9,10 +9,19 @@ jobs: update_release_draft: runs-on: ubuntu-latest steps: + - uses: actions/checkout@v3 + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: 3.10 + - name: Install Poetry + run: curl -sSL https://install.python-poetry.org | python + - name: Get version from pyproject.toml + run: echo "VERSION=$(poetry version -s)" >> $GITHUB_ENV - uses: release-drafter/release-drafter@v5 with: - name: next - tag: next - version: next + name: ${{ env.VERSION }} + tag: ${{ env.VERSION }} + version: ${{ env.VERSION }} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}