Skip to content

chore: bump version to 2.4.0 #17

chore: bump version to 2.4.0

chore: bump version to 2.4.0 #17

Workflow file for this run

name: Release Build
on:
push:
tags:
- 'v*' # Triggers on version tags like v1.0.0
workflow_dispatch: # Allows manual trigger from GitHub UI
# Ensure only one release build runs at a time
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: false
jobs:
release:
permissions:
contents: write
strategy:
fail-fast: false
matrix:
platform: [macos-latest, ubuntu-24.04, windows-latest]
runs-on: ${{ matrix.platform }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install dependencies (Ubuntu only)
if: matrix.platform == 'ubuntu-24.04'
run: |
sudo apt-get update
sudo apt-get install -y \
libwebkit2gtk-4.1-dev \
libappindicator3-dev \
librsvg2-dev \
patchelf \
libfuse2
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'
- name: Install Rust stable
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: stable
cache: true
- name: Install frontend dependencies
run: npm ci
- name: Download MPV for Windows bundling
if: matrix.platform == 'windows-latest'
shell: bash
run: |
echo "📥 Downloading MPV Windows build from shinchiro..."
# Get latest MPV release from shinchiro's GitHub releases
MPV_URL=$(curl -s https://api.github.com/repos/shinchiro/mpv-winbuild-cmake/releases/latest | \
grep "browser_download_url.*mpv-x86_64.*7z\"" | \
head -1 | \
cut -d '"' -f 4)
echo "Found MPV URL: $MPV_URL"
# Download MPV
curl -L "$MPV_URL" -o mpv-windows.7z
# Verify download size (should be >30MB)
FILE_SIZE=$(stat -c%s mpv-windows.7z 2>/dev/null || stat -f%z mpv-windows.7z)
echo "Downloaded file size: $FILE_SIZE bytes"
if [ "$FILE_SIZE" -lt 30000000 ]; then
echo "❌ Error: Downloaded file is too small (likely not a valid archive)"
exit 1
fi
# Extract with 7z (pre-installed on Windows runners)
7z x mpv-windows.7z -o"./resources-temp"
# Debug: Show what was extracted
echo "📂 Contents of resources-temp:"
ls -la ./resources-temp/ || true
# Move extracted content to resources/mpv
# The archive structure varies - mpv.exe may be directly in root or in a subfolder
mkdir -p resources/mpv
if [ -f "./resources-temp/mpv.exe" ]; then
# mpv.exe is directly in resources-temp (current shinchiro structure)
echo "Found mpv.exe directly in resources-temp"
# Copy contents (not the folder itself) to resources/mpv
cp -r ./resources-temp/* ./resources/mpv/
elif ls -d ./resources-temp/mpv-x86_64-* 1>/dev/null 2>&1; then
# mpv.exe is in a subfolder like mpv-x86_64-YYYYMMDD
echo "Found mpv-x86_64-* folder"
MPV_FOLDER=$(ls -d ./resources-temp/mpv-x86_64-* | head -1)
cp -r "$MPV_FOLDER"/* ./resources/mpv/
else
echo "❌ Error: Could not find mpv.exe in extracted files"
ls -laR ./resources-temp/
exit 1
fi
# Verify
ls -la ./resources/mpv/mpv.exe
echo "✅ MPV bundled for Windows build"
- name: Build Tauri app
uses: tauri-apps/tauri-action@v0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tagName: ${{ github.ref_name }}
releaseName: 'Better IPTV ${{ github.ref_name }}'
releaseBody: |
## What's Changed
See the assets below to download Better IPTV for your platform.
**Note:** Make sure MPV is installed on your system before running Better IPTV.
### Installation:
- **Linux (Arch/Manjaro)**: Download `*-arch.AppImage`, make executable, and run
- **Linux (Ubuntu/Debian)**: Download regular `.AppImage`, make executable, and run
- **Windows**: Download `.msi` and install
- **macOS**: Download `.dmg` and drag to Applications
releaseDraft: true
prerelease: false
args: --verbose
- name: Create Arch-compatible AppImage (Linux only)
if: matrix.platform == 'ubuntu-24.04'
run: |
echo "📦 Creating Arch-compatible AppImage..."
# Find the built AppImage
APPIMAGE=$(find src-tauri/target/release/bundle/appimage -name "*.AppImage" | head -1)
if [ -z "$APPIMAGE" ]; then
echo "❌ No AppImage found"
exit 1
fi
echo "Found AppImage: $APPIMAGE"
# Extract AppImage
chmod +x "$APPIMAGE"
"$APPIMAGE" --appimage-extract
# Remove bundled libs that cause EGL issues on Arch/newer distros
# These systems have newer WebKit that works better with native libs
echo "🔧 Removing bundled WebKit libs for Arch compatibility..."
rm -rf squashfs-root/usr/lib/x86_64-linux-gnu/webkit2gtk-4.1 || true
rm -rf squashfs-root/usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0 || true
rm -rf squashfs-root/usr/lib/x86_64-linux-gnu/gio || true
rm -rf squashfs-root/usr/lib/x86_64-linux-gnu/gtk-3.0 || true
rm -f squashfs-root/usr/lib/libwayland-egl.so.1 || true
# Download appimagetool
echo "📥 Downloading appimagetool..."
curl -L -o appimagetool https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage
chmod +x appimagetool
# Repack as Arch-compatible AppImage
ARCH_APPIMAGE="${APPIMAGE%.AppImage}-arch.AppImage"
echo "📦 Repacking as: $ARCH_APPIMAGE"
ARCH=x86_64 ./appimagetool squashfs-root "$ARCH_APPIMAGE"
# Cleanup
rm -rf squashfs-root appimagetool
echo "✅ Arch-compatible AppImage created: $ARCH_APPIMAGE"
ls -la "$ARCH_APPIMAGE"
- name: Upload Arch AppImage to release (Linux only)
if: matrix.platform == 'ubuntu-24.04'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
# Find the Arch AppImage
ARCH_APPIMAGE=$(find src-tauri/target/release/bundle/appimage -name "*-arch.AppImage" | head -1)
if [ -n "$ARCH_APPIMAGE" ]; then
echo "📤 Uploading Arch AppImage to release..."
gh release upload "${{ github.ref_name }}" "$ARCH_APPIMAGE" --clobber
echo "✅ Uploaded: $ARCH_APPIMAGE"
fi