From e4c4911fa63f442b54e67a8bab57c6fadb5b9f14 Mon Sep 17 00:00:00 2001 From: Srinivas Edireswarapu - I17752 Date: Tue, 8 Oct 2024 15:18:50 +0530 Subject: [PATCH] build sdist flag added --- .github/workflows/build.yml | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e4159b5c..4ae090db 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -70,15 +70,18 @@ jobs: - name: Describe Tag & Branch Name id: build_names run: | - # Only set TAG_NAME if the event is a tag push - if [[ "${GITHUB_REF}" == refs/tags/* ]]; then - echo TAG_NAME=${GITHUB_REF#refs/tags/} >> $GITHUB_OUTPUT - else + echo TAG_NAME=${GITHUB_REF#refs/tags/} >> $GITHUB_OUTPUT + + - name: Check if event is a tag push + id: check_tag + run: | + if [[ "${GITHUB_REF}" != refs/tags/* ]]; then echo "This event is not a tag push. Skipping sdist build." - exit 1 # Exit if not a tag + echo "skip_build=true" >> $GITHUB_ENV # Set an environment variable to control flow fi - name: Build sdist + if: env.skip_build != 'true' run: | echo $TAG_NAME cd python @@ -94,6 +97,7 @@ jobs: TAG_NAME: ${{ steps.build_names.outputs.TAG_NAME }} - uses: actions/upload-artifact@v4 + if: env.skip_build != 'true' with: path: python/dist/*.tar.gz overwrite: true