@@ -40,11 +40,13 @@ jobs:
4040 - name : Extract tag and Details
4141 id : release
4242 run : |
43+ set -euo pipefail
4344 if [[ "${GITHUB_REF_TYPE}" == "tag" ]]; then
4445 TAG_NAME="${GITHUB_REF#refs/tags/}"
4546 elif [[ -n "${{ inputs.tag-name }}" ]]; then
4647 TAG_NAME="${{ inputs.tag-name }}"
4748 fi
49+ : "${TAG_NAME:?missing tag_name output}"
4850 echo "TAG-NAME: ${TAG_NAME}" >> $GITHUB_STEP_SUMMARY
4951 echo "tag_name=$(echo ${TAG_NAME})" >> "$GITHUB_OUTPUT"
5052
7577 fi
7678
7779 build_and_test :
78- if : ${{ inputs['pypi-publish'] }}
79- needs : check_pypi
80+ needs : details
8081 runs-on : ubuntu-latest
8182 steps :
8283 - uses : actions/checkout@v4
@@ -118,7 +119,9 @@ jobs:
118119 pypi_publish :
119120 if : ${{ inputs['pypi-publish'] }}
120121 name : Upload release to PyPI
121- needs : build_and_test
122+ needs :
123+ - check_pypi
124+ - build_and_test
122125 runs-on : ubuntu-latest
123126 environment :
124127 name : release
@@ -135,18 +138,22 @@ jobs:
135138
136139 github_release :
137140 name : Create GitHub Release
138- needs : details
141+ needs :
142+ - details
143+ - build_and_test
139144 runs-on : ubuntu-latest
140145 permissions :
141146 contents : write
147+ env :
148+ TAG : ${{ needs.details.outputs.tag_name }}
142149 steps :
143150 - name : Checkout Code
144151 uses : actions/checkout@v4
145152 with :
146153 fetch-depth : 0
147154 - name : Create Changelog
148155 id : change-log
149- uses : yorevs /hspylib/.github/actions/changelog@master
156+ uses : HS-Teams /hspylib/.github/actions/changelog@master
150157 with :
151158 tag-name : ${{ needs.details.outputs.tag_name }}
152159 - name : Download artifacts
@@ -160,8 +167,10 @@ jobs:
160167 env :
161168 GH_TOKEN : ${{ github.token }}
162169 run : |
170+ set -euo pipefail
171+ : "${TAG:?missing tag_name output}"
163172 echo "${{ steps.change-log.outputs.changelog }}" > changelog
164173 [[ "${{ inputs['pypi-publish'] }}" == 'true' ]] && assets="dist/*"
165- gh release create ${{ needs.details.outputs.tag_name }} \
174+ gh release create "${TAG}" \
166175 --title "${{ vars.PACKAGE_NAME }}-${{ needs.details.outputs.tag_name }}-rc${{ github.run_number }}" \
167176 --notes-file changelog ${assets}
0 commit comments