From 740fabbbe9929f61f5fc9797ecd9fbf281e31f9f Mon Sep 17 00:00:00 2001 From: tayf <144544047+be-at@users.noreply.github.com> Date: Thu, 19 Mar 2026 16:37:46 +0200 Subject: [PATCH] update workflow --- .github/workflows/publish.yml | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 76b5c0c..efb5bfc 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -1,12 +1,6 @@ name: Publish to PyPI - on: workflow_dispatch: - inputs: - version: - description: 'Version to release (e.g. 1.0.0)' - required: true - type: string jobs: publish: @@ -15,20 +9,24 @@ jobs: permissions: id-token: write contents: write - steps: - uses: actions/checkout@v4 - - uses: astral-sh/setup-uv@v5 + - name: Get version from pyproject.toml + id: get_version + run: | + VERSION=$(python -c "import tomllib; data=tomllib.load(open('pyproject.toml','rb')); print(data['project']['version'])") + echo "version=$VERSION" >> $GITHUB_OUTPUT + - name: Build run: uv build - name: Create GitHub Release uses: softprops/action-gh-release@v2 with: - tag_name: v${{ github.event.inputs.version }} - name: v${{ github.event.inputs.version }} + tag_name: v${{ steps.get_version.outputs.version }} + name: v${{ steps.get_version.outputs.version }} generate_release_notes: true - name: Publish to PyPI