diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ebe3013..72b5e27 100755 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -266,21 +266,39 @@ jobs: # Set default FROM address if not provided FROM_ADDRESS="${MAIL_FROM:-ReVanced Build Bot }" - # Build download links from build folder + # Build download links from build folder (separate APKs and Modules) cd build || { echo "build folder not found"; exit 1; } - DOWNLOAD_LINKS="" + APK_LINKS="" + MODULE_LINKS="" for OUTPUT in *; do DL_URL="${{ github.server_url }}/${{ github.repository }}/releases/download/${VERSION}/${OUTPUT}" if [[ $OUTPUT = *.apk ]]; then - DOWNLOAD_LINKS+="
  • 📦 ${OUTPUT}
  • " + APK_LINKS+="
  • 📦 ${OUTPUT}
  • " elif [[ $OUTPUT = *.zip ]]; then - DOWNLOAD_LINKS+="
  • 📁 ${OUTPUT}
  • + MODULE_LINKS+="
  • 📁 ${OUTPUT}
  • " fi done cd .. - # Create HTML email body + # Get current time in Vietnam timezone (UTC+7) + BUILD_TIME=$(TZ='Asia/Ho_Chi_Minh' date '+%Y-%m-%d %H:%M:%S (UTC+7)') + + # Get changelog from build.md and convert to HTML + if [ -f "build.md" ]; then + # Convert markdown to simple HTML + CHANGELOG_HTML=$(sed 's/^### \(.*\)/

    \1<\/h3>/g; + s/^\* \*\*\(.*\)\*\*/
  • \1<\/strong><\/li>/g; + s/^\* \(.*\)/
  • \1<\/li>/g; + s/^- \(.*\)/
  • \1<\/li>/g; + s/`\([^`]*\)`/\1<\/code>/g; + /^==/d; + /^$/d' build.md | tr '\n' ' ') + else + CHANGELOG_HTML="

    No changelog available.

    " + fi + + # Create HTML email body (similar structure to Telegram) HTML_BODY=$(cat < @@ -291,24 +309,51 @@ jobs:

    🎉 New ReVanced Build!

    Version: v${VERSION}

    +

    🕐 ${BUILD_TIME}

    +
    -
    -

    📋 Build Summary

    -

    A new ReVanced build has been completed successfully!

    + +
    +

    📋 Changelog

    +
    + ${CHANGELOG_HTML} +
    -
    -

    📥 Downloads

    -
      - ${DOWNLOAD_LINKS} -
    + + +
    +

    � Download Links

    + + + $(if [ -n "$MODULE_LINKS" ]; then echo " +
    +

    � Modules:

    +
      + ${MODULE_LINKS} +
    +
    + "; fi) + + + $(if [ -n "$APK_LINKS" ]; then echo " +
    +

    📱 APKs:

    +
      + ${APK_LINKS} +
    +
    + "; fi)
    - +

    This is an automated message from ReVanced Build Bot

    Repository: ${REPO}

    diff --git a/.github/workflows/email-notify-check.yml b/.github/workflows/email-notify-check.yml index 480ec59..a93b119 100644 --- a/.github/workflows/email-notify-check.yml +++ b/.github/workflows/email-notify-check.yml @@ -34,7 +34,9 @@ jobs: # Set default FROM address if not provided FROM_ADDRESS="${MAIL_FROM:-ReVanced Build Bot }" - VERSION="TEST-$(date +%Y%m%d-%H%M%S)" + # Use Vietnam timezone (UTC+7) + VERSION="TEST-$(TZ='Asia/Ho_Chi_Minh' date +%Y%m%d-%H%M%S)" + SENT_TIME=$(TZ='Asia/Ho_Chi_Minh' date '+%Y-%m-%d %H:%M:%S (UTC+7)') RELEASE_URL="${{ github.server_url }}/${{ github.repository }}/releases" REPO="${{ github.repository }}" @@ -53,14 +55,14 @@ jobs:

    ✅ Email Configuration Working!

    -

    Nếu bạn nhận được email này, nghĩa là cấu hình Resend đã hoạt động chính xác.

    +

    If you received this email, it means your Resend configuration is working correctly!

    📋 Configuration Details

    • 📧 From: ${FROM_ADDRESS}
    • 📬 To: ${MAIL_TO}
    • -
    • 🕐 Sent at: $(date -u '+%Y-%m-%d %H:%M:%S UTC')
    • +
    • 🕐 Sent at: ${SENT_TIME}