@@ -135,10 +135,10 @@ jobs:
135135 run : echo "Skipping validation - installer is now tested in mados-installer repo"
136136
137137 # ================================================================
138- # Stage 3: Build ISO (only on tag push)
138+ # Stage 3: Build ISO + Release (only on tag push)
139139 # ================================================================
140- build :
141- name : " Build ISO "
140+ build-and-release :
141+ name : " Build & Release "
142142 runs-on : ubuntu-latest
143143 needs : validate
144144 if : github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
@@ -202,6 +202,7 @@ jobs:
202202 echo "Build successful!"
203203
204204 - name : Upload to Internet Archive
205+ id : ia-upload
205206 env :
206207 IA_ACCESS_KEY : ${{ secrets.IA_ACCESS_KEY }}
207208 IA_SECRET_KEY : ${{ secrets.IA_SECRET_KEY }}
@@ -214,11 +215,34 @@ jobs:
214215 BUILD_DATE="${{ steps.build.outputs.build_date }}"
215216 export IA_ACCESS_KEY IA_SECRET_KEY ISO_NAME VERSION BUILD_DATE
216217
217- python3 "${{ github.workspace }}/.github/scripts/ia_upload.py"
218+ IA_URL=$(python3 "${{ github.workspace }}/.github/scripts/ia_upload.py" 2>&1 | grep "^URL:" | cut -d' ' -f2)
219+ if [ -z "$IA_URL" ]; then
220+ echo "ERROR: Failed to get Internet Archive URL"
221+ exit 1
222+ fi
223+ echo "ia_url=$IA_URL" >> $GITHUB_OUTPUT
224+
225+ - name : Get tag
226+ id : get_tag
227+ run : echo "TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
218228
219- outputs :
220- iso_name : ${{ steps.build.outputs.iso_name }}
221- version : ${{ steps.build.outputs.version }}
222- build_date : ${{ steps.build.outputs.build_date }}
223- iso_size_mb : ${{ steps.build.outputs.iso_size_mb }}
224- short_sha : ${{ steps.build.outputs.short_sha }}
229+ - name : Create GitHub Release
230+ uses : softprops/action-gh-release@v2
231+ env :
232+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
233+ FORCE_JAVASCRIPT_ACTIONS_TO_NODE24 : true
234+ with :
235+ tag_name : ${{ steps.get_tag.outputs.TAG }}
236+ name : ${{ steps.get_tag.outputs.TAG }}
237+ draft : false
238+ prerelease : false
239+ body : |
240+ ## madOS ${{ steps.get_tag.outputs.TAG }}
241+
242+ **Download:** [Internet Archive](${{ steps.ia-upload.outputs.ia_url }})
243+
244+ ---
245+ Built from: `${{ github.sha }}`
246+ files : |
247+ out/${{ steps.build.outputs.iso_name }}
248+ out/SHA256SUMS
0 commit comments