Skip to content

Commit

Permalink
das-117: Parameterize the pipeline execution process (#367)
Browse files Browse the repository at this point in the history
  • Loading branch information
levisingularity authored Nov 25, 2024
1 parent 6a41583 commit 98da4d1
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion .github/workflows/publish-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 }}
Expand Down

0 comments on commit 98da4d1

Please sign in to comment.