@@ -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,21 @@ jobs:
135138
136139 github_release :
137140 name : Create GitHub Release
138- needs : details
141+ shell : bash
142+ needs : build_and_test
139143 runs-on : ubuntu-latest
140144 permissions :
141145 contents : write
146+ env :
147+ TAG : ${{ needs.details.outputs.tag_name }}
142148 steps :
143149 - name : Checkout Code
144150 uses : actions/checkout@v4
145151 with :
146152 fetch-depth : 0
147153 - name : Create Changelog
148154 id : change-log
149- uses : yorevs /hspylib/.github/actions/changelog@master
155+ uses : HS-Teams /hspylib/.github/actions/changelog@master
150156 with :
151157 tag-name : ${{ needs.details.outputs.tag_name }}
152158 - name : Download artifacts
@@ -160,8 +166,10 @@ jobs:
160166 env :
161167 GH_TOKEN : ${{ github.token }}
162168 run : |
169+ set -euo pipefail
170+ : "${TAG:?missing tag_name output}"
163171 echo "${{ steps.change-log.outputs.changelog }}" > changelog
164172 [[ "${{ inputs['pypi-publish'] }}" == 'true' ]] && assets="dist/*"
165- gh release create ${{ needs.details.outputs.tag_name }} \
173+ gh release create "${TAG}" \
166174 --title "${{ vars.PACKAGE_NAME }}-${{ needs.details.outputs.tag_name }}-rc${{ github.run_number }}" \
167175 --notes-file changelog ${assets}
0 commit comments