From 98da4d1dad62c5b3321979ca848714b076e1f00c Mon Sep 17 00:00:00 2001 From: Levi <141682181+levisingularity@users.noreply.github.com> Date: Mon, 25 Nov 2024 13:59:44 -0300 Subject: [PATCH] das-117: Parameterize the pipeline execution process (#367) --- .github/workflows/publish-pypi.yml | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/.github/workflows/publish-pypi.yml b/.github/workflows/publish-pypi.yml index 8023f74b..6e0db5ac 100644 --- a/.github/workflows/publish-pypi.yml +++ b/.github/workflows/publish-pypi.yml @@ -4,9 +4,13 @@ on: workflow_dispatch: inputs: version: - description: "Version to tag" + description: "Version to tag (e.g., 1.0.0)" required: true + hyperon-das-atomdb-version: + description: "Hyperon-das-atomdb version (optional)" + required: false + jobs: tag: uses: singnet/das/.github/workflows/run-semver.yml@master @@ -39,6 +43,16 @@ jobs: pip install poetry poetry config pypi-token.pypi ${{ secrets.PYPI_API_TOKEN }} + - name: Update hyperon-das-atomdb version + if: ${{inputs.hyperon-das-atomdb-version}} + run: |- + if [[ "${{inputs.hyperon-das-atomdb-version}}" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then + poetry add hyperon-das-atomdb=${{inputs.hyperon-das-atomdb-version}} + else + echo "The provided version '${{inputs.hyperon-das-atomdb-version}}' is invalid." + exit 1 + fi + - name: Build and Publishing library version in PyPI run: | poetry version ${{ github.event.inputs.version }}