@@ -155,7 +155,7 @@ jobs:
155155
156156 release :
157157 runs-on : ubuntu-latest
158- needs : build
158+ needs : [qpm_info, build]
159159 if : startsWith(github.ref, 'refs/tags/v')
160160 permissions :
161161 contents : write
@@ -167,6 +167,18 @@ jobs:
167167 name : build-artifacts
168168 path : output/
169169
170+ - name : Get Library Name and Build ID
171+ id : lib_info
172+ run : |
173+ cd output
174+ echo "LIBNAME=$(basename "${{ needs.qpm_info.outputs.override_so_name }}")" | tee -a $GITHUB_OUTPUT
175+ echo "BUILD_ID=$(readelf -n "debug_$(basename "${{ needs.qpm_info.outputs.override_so_name }}")" | grep -Po "(?<=Build ID: )[0-9a-f]+")" | tee -a $GITHUB_OUTPUT
176+
177+ - name : Calculate SHA-256 of the qmod file
178+ id : qmodsha
179+ run : |
180+ echo "QMOD_SHA=$(sha256sum "output/$(basename "${{ needs.qpm_info.outputs.qmod_output_path }}")" | grep -Po "^[0-9a-f]+")" | tee -a $GITHUB_OUTPUT
181+
170182 - name : Upload .qmod
171183 id : upload_file_qmod
172184 uses : softprops/action-gh-release@v2
@@ -179,13 +191,31 @@ jobs:
179191 env :
180192 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
181193
194+ - name : Generate release body
195+ run : |
196+ BODY_FILE="body.txt"
197+ echo '---' >> body.txt
198+ echo '' >> body.txt
199+ echo '### Build Information' >> body.txt
200+ echo '' >> body.txt
201+ echo "**Build ID:** ${{ steps.lib_info.outputs.BUILD_ID }}" >> body.txt
202+ echo '' >> body.txt
203+ echo '### Checksums' >> body.txt
204+ echo '' >> body.txt
205+ echo '```' >> body.txt
206+ (cd output && sha256sum *) >> body.txt
207+ echo '```' >> body.txt
208+
182209 - name : Upload .so artifacts
183210 id : upload_file_so
184211 uses : softprops/action-gh-release@v2
185212 with :
186213 tag_name : ${{ github.event.inputs.version }}
187214 files : |
188215 ./output/*.so
216+ body_path : body.txt
217+ generate_release_notes : true
218+
189219 env :
190220 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
191221
0 commit comments