@@ -350,158 +350,5 @@ jobs:
350350 path : |
351351 src-tauri/target/${{ matrix.target }}/release/bundle/deb/*.deb
352352 src-tauri/target/${{ matrix.target }}/release/bundle/rpm/*.rpm
353- retention-days : 30
354-
355- summary :
356- name : Build Summary
357- needs : [prepare, build, build-linux-arm]
358- runs-on : ubuntu-latest
359- if : always()
360- steps :
361- - name : Download all artifacts
362- uses : actions/download-artifact@v7
363- with :
364- path : artifacts
365-
366- - name : Checkout for release notes
367- uses : actions/checkout@v6
368- with :
369- sparse-checkout : |
370- release_notes.md
371- sparse-checkout-cone-mode : false
372-
373- - name : Generate latest.json for test builds
374- run : |
375- VERSION="${{ needs.prepare.outputs.version }}"
376- PUB_DATE=$(date -u +"%Y-%m-%dT%H:%M:%SZ")
377- BUILD_DATE="${{ needs.prepare.outputs.build-date }}"
378-
379- # Function to find and read signature file
380- get_signature() {
381- local pattern="$1"
382- local sig_file=$(find artifacts -name "${pattern}.sig" -type f 2>/dev/null | head -n 1)
383- if [ -n "$sig_file" ] && [ -f "$sig_file" ]; then
384- cat "$sig_file"
385- else
386- echo ""
387- fi
388- }
389-
390- # Get signatures from build artifacts
391- WIN_X64_SIG=$(get_signature "*_x64-setup.nsis.zip")
392- WIN_ARM64_SIG=$(get_signature "*_arm64-setup.nsis.zip")
393- MAC_ARM64_SIG=$(get_signature "*_aarch64.app.tar.gz")
394- MAC_X64_SIG=$(get_signature "*_x64.app.tar.gz")
395- LINUX_X64_SIG=$(get_signature "*_amd64.AppImage")
396- LINUX_ARM64_SIG=$(get_signature "*_aarch64.AppImage")
397-
398- # Read release notes from release_notes.md if available
399- if [ -f "release_notes.md" ]; then
400- NOTES=$(cat release_notes.md | jq -Rs .)
401- else
402- NOTES="\"Test build generated on ${BUILD_DATE}\\n\\nCommit: ${{ github.sha }}\\nBranch: ${{ github.ref_name }}\""
403- fi
404-
405- # Note: For test builds, URLs are placeholders since artifacts aren't published to a release
406- # This latest.json is useful for testing the update mechanism structure
407- cat > latest.json << EOF
408- {
409- "version": "${VERSION}",
410- "notes": ${NOTES},
411- "pub_date": "${PUB_DATE}",
412- "platforms": {
413- "windows-x86_64": {
414- "url": "https://github.com/${{ github.repository }}/releases/download/v${VERSION}/OpenList-Desktop_${VERSION}_x64-setup.nsis.zip",
415- "signature": "${WIN_X64_SIG}"
416- },
417- "windows-aarch64": {
418- "url": "https://github.com/${{ github.repository }}/releases/download/v${VERSION}/OpenList-Desktop_${VERSION}_arm64-setup.nsis.zip",
419- "signature": "${WIN_ARM64_SIG}"
420- },
421- "darwin-aarch64": {
422- "url": "https://github.com/${{ github.repository }}/releases/download/v${VERSION}/OpenList-Desktop_${VERSION}_aarch64.app.tar.gz",
423- "signature": "${MAC_ARM64_SIG}"
424- },
425- "darwin-x86_64": {
426- "url": "https://github.com/${{ github.repository }}/releases/download/v${VERSION}/OpenList-Desktop_${VERSION}_x64.app.tar.gz",
427- "signature": "${MAC_X64_SIG}"
428- },
429- "linux-x86_64": {
430- "url": "https://github.com/${{ github.repository }}/releases/download/v${VERSION}/OpenList-Desktop_${VERSION}_amd64.AppImage",
431- "signature": "${LINUX_X64_SIG}"
432- },
433- "linux-aarch64": {
434- "url": "https://github.com/${{ github.repository }}/releases/download/v${VERSION}/OpenList-Desktop_${VERSION}_aarch64.AppImage",
435- "signature": "${LINUX_ARM64_SIG}"
436- }
437- }
438- }
439- EOF
440-
441- echo "Generated latest.json for test build:"
442- cat latest.json
443-
444- - name : Create build summary
445- run : |
446- echo "# Build Test Summary" > build-summary.md
447- echo "" >> build-summary.md
448- echo "**Version:** ${{ needs.prepare.outputs.version }}" >> build-summary.md
449- echo "**Build Date:** ${{ needs.prepare.outputs.build-date }}" >> build-summary.md
450- echo "**Commit:** ${{ github.sha }}" >> build-summary.md
451- echo "**Branch:** ${{ github.ref_name }}" >> build-summary.md
452- echo "" >> build-summary.md
453- echo "## Build Status" >> build-summary.md
454- echo "" >> build-summary.md
455-
456- # Check build status
457- if [ "${{ needs.build.result }}" == "success" ]; then
458- echo "✅ **Main platforms build:** Success" >> build-summary.md
459- else
460- echo "❌ **Main platforms build:** Failed" >> build-summary.md
461- fi
462-
463- if [ "${{ needs.build-linux-arm.result }}" == "success" ]; then
464- echo "✅ **Linux ARM build:** Success" >> build-summary.md
465- else
466- echo "❌ **Linux ARM build:** Failed" >> build-summary.md
467- fi
468-
469- echo "" >> build-summary.md
470- echo "## Available Artifacts" >> build-summary.md
471- echo "" >> build-summary.md
472- echo "The following build artifacts are available for download from the Actions tab:" >> build-summary.md
473- echo "" >> build-summary.md
474-
475- # List artifacts
476- if [ -d "artifacts" ]; then
477- find artifacts -name "*.exe" -o -name "*.msi" -o -name "*.dmg" -o -name "*.pkg" -o -name "*.deb" -o -name "*.rpm" -o -name "*.AppImage" | while read file; do
478- echo "- $(basename "$file")" >> build-summary.md
479- done
480- fi
481-
482- echo "" >> build-summary.md
483- echo "## Auto-Update Test File" >> build-summary.md
484- echo "" >> build-summary.md
485- echo "A \`latest.json\` file has been generated for testing the auto-update mechanism." >> build-summary.md
486- echo "Download it from the \`update-manifest\` artifact." >> build-summary.md
487- echo "" >> build-summary.md
488- echo "## Testing Instructions" >> build-summary.md
489- echo "" >> build-summary.md
490- echo "1. Download the appropriate artifact for your platform from the GitHub Actions page" >> build-summary.md
491- echo "2. Extract and install the application" >> build-summary.md
492- echo "3. Test the functionality" >> build-summary.md
493- echo "4. Report any issues found" >> build-summary.md
494-
495- - name : Upload build summary
496- uses : actions/upload-artifact@v6
497- with :
498- name : build-summary
499- path : build-summary.md
500- retention-days : 30
501-
502- - name : Upload latest.json artifact
503- uses : actions/upload-artifact@v6
504- with :
505- name : update-manifest
506- path : latest.json
353+ src-tauri/target/${{ matrix.target }}/release/bundle/**/*.sig
507354 retention-days : 30
0 commit comments