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 }}