From 386cc48f1e5125cce26e717737ab6cd8143c4630 Mon Sep 17 00:00:00 2001 From: soustruh Date: Thu, 5 Mar 2026 23:00:43 +0100 Subject: [PATCH] version input in the Deploy workflow for TestPyPI --- .github/workflows/deploy.yml | 17 ++++++++--------- pyproject.toml | 2 +- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index efbab67..3f54803 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -3,10 +3,9 @@ name: Build & Deploy to PyPI on: workflow_dispatch: inputs: - note: - description: 'This workflow publishes to TestPyPI only. For production, create a GitHub Release.' - required: false - default: "" + version: + description: Package version (applies to TestPyPI only; for production, create a GitHub release) + required: true release: types: [published] @@ -37,12 +36,12 @@ jobs: run: | uv run pytest tests - - name: Version replacement based on tag ↔️ - if: github.ref_type == 'tag' + - name: Version replacement based on workflow input or release tag ↔️ + if: inputs.version || github.ref_type == 'tag' run: | - TAG_VERSION=${GITHUB_REF#refs/tags/} - echo "Tag version: $TAG_VERSION" - uv version $TAG_VERSION + VERSION="${{ inputs.version || github.ref_name }}" + echo "Setting version: $VERSION" + uv version $VERSION - name: Build package 📦 run: | diff --git a/pyproject.toml b/pyproject.toml index 179ca3c..de7519f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "keboola.component" -version = "1.9.0" # replaced by the actual version based on the release tag in github actions +version = "0.0.0" # replaced by the actual version based on the release tag in github actions dependencies = [ "pygelf", "deprecated",