File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -70,15 +70,18 @@ jobs:
7070 - name : Describe Tag & Branch Name
7171 id : build_names
7272 run : |
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
73+ echo TAG_NAME=${GITHUB_REF#refs/tags/} >> $GITHUB_OUTPUT
74+
75+ - name : Check if event is a tag push
76+ id : check_tag
77+ run : |
78+ if [[ "${GITHUB_REF}" != refs/tags/* ]]; then
7779 echo "This event is not a tag push. Skipping sdist build."
78- exit 1 # Exit if not a tag
80+ echo "skip_build=true" >> $GITHUB_ENV # Set an environment variable to control flow
7981 fi
8082
8183 - name : Build sdist
84+ if : env.skip_build != 'true'
8285 run : |
8386 echo $TAG_NAME
8487 cd python
9497 TAG_NAME : ${{ steps.build_names.outputs.TAG_NAME }}
9598
9699 - uses : actions/upload-artifact@v4
100+ if : env.skip_build != 'true'
97101 with :
98102 path : python/dist/*.tar.gz
99103 overwrite : true
You can’t perform that action at this time.
0 commit comments