Skip to content

Commit d1bbd82

Browse files
committed
build sdist step coorection
1 parent 2e2e37e commit d1bbd82

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

.github/workflows/build.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,13 @@ jobs:
7070
- name: Describe Tag & Branch Name
7171
id: build_names
7272
run: |
73-
echo TAG_NAME=${GITHUB_REF#refs/tags/} >> $GITHUB_OUTPUT
73+
# Only set TAG_NAME if the event is a tag push
74+
if [[ "${GITHUB_REF}" == refs/tags/* ]]; then
75+
echo TAG_NAME=${GITHUB_REF#refs/tags/} >> $GITHUB_OUTPUT
76+
else
77+
echo "This event is not a tag push. Skipping sdist build."
78+
exit 1 # Exit if not a tag
79+
fi
7480
7581
- name: Build sdist
7682
run: |
@@ -82,7 +88,7 @@ jobs:
8288
mkdir app
8389
cp -r ../app/tng app
8490
python -m pip install --upgrade pip
85-
pip install build
91+
python -m pip install build
8692
python -m build
8793
env:
8894
TAG_NAME: ${{ steps.build_names.outputs.TAG_NAME }}

0 commit comments

Comments
 (0)