Skip to content

ux enhancements

ux enhancements #24

name: Build AppImage
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:
permissions:
contents: write
packages: read
jobs:
build-appimage:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
channel: 'stable'
- name: Verify Flutter installation
run: |
flutter --version
flutter doctor -v
- name: Install system dependencies for AppImage and system tray
run: |
sudo apt-get update
sudo apt-get install -y \
curl \
git \
unzip \
xz-utils \
zip \
libglu1-mesa \
ninja-build \
cmake \
pkg-config \
libgtk-3-dev \
libblkid-dev \
liblzma-dev \
libayatana-appindicator3-dev \
appstream \
desktop-file-utils \
fuse \
libfuse2 \
imagemagick
- name: Download AppImageTool
run: |
wget -O appimagetool-x86_64.AppImage https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage
chmod +x appimagetool-x86_64.AppImage
sudo mv appimagetool-x86_64.AppImage /usr/local/bin/appimagetool
- name: Enable Flutter Linux desktop
run: flutter config --enable-linux-desktop
- name: Get Flutter dependencies
run: flutter pub get
- name: Build dual AppImages (JIT and Release)
run: |
# Make the build script executable
chmod +x build-appimage.sh
# Set version for consistent naming
export SHORT_SHA=$(echo $GITHUB_SHA | cut -c1-8)
export VERSION="${SHORT_SHA}"
# Show version being used
echo "Building AppImages with version: $VERSION"
# Run the build script
./build-appimage.sh
- name: Make AppImages executable
run: |
echo "=== Files before making executable ==="
ls -la tunstun-* || echo "No tunstun files found"
echo "=== Making AppImages executable ==="
chmod +x tunstun-*-x86_64.AppImage
echo "=== Final AppImage files ==="
ls -la tunstun-*-x86_64.AppImage
- name: Test AppImage structure
run: |
echo "=== AppImage Files ==="
ls -la tunstun-*-x86_64.AppImage
echo "=== JIT AppImage Info ==="
if [ -f tunstun-jit-*-x86_64.AppImage ]; then
echo "JIT Version found ($(du -h tunstun-jit-*-x86_64.AppImage | cut -f1))"
fi
echo "=== Release AppImage Info ==="
if [ -f tunstun-release-*-x86_64.AppImage ]; then
echo "Release Version found ($(du -h tunstun-release-*-x86_64.AppImage | cut -f1))"
fi
- name: Create release info
run: |
echo "# Tunstun AppImage Build" > release_notes.md
echo "" >> release_notes.md
echo "**Build Information:**" >> release_notes.md
echo "- Commit: ${GITHUB_SHA}" >> release_notes.md
echo "- Branch: ${GITHUB_REF_NAME}" >> release_notes.md
echo "- Built on: $(date -u +"%Y-%m-%d %H:%M:%S UTC")" >> release_notes.md
echo "- Flutter Version: $(flutter --version | head -1)" >> release_notes.md
echo "" >> release_notes.md
echo "**Versions Available:**" >> release_notes.md
echo "- **Release Version**: Optimized for production use (~19MB) - Included in this release" >> release_notes.md
echo "- **JIT Version**: Debug build for development (~47MB) - Available as workflow artifact" >> release_notes.md
echo "" >> release_notes.md
echo "**Features:**" >> release_notes.md
echo "- SSH tunnel management with GUI" >> release_notes.md
echo "- System tray integration" >> release_notes.md
echo "- Manage multiple tunnel configurations in YAML files." >> release_notes.md
echo "- Connect All / Disconnect All functionality" >> release_notes.md
echo "- Optimized traffic monitoring (only when window visible)" >> release_notes.md
echo "- Minimal library bundling for maximum compatibility" >> release_notes.md
echo "" >> release_notes.md
echo "**Installation:**" >> release_notes.md
echo "1. Download the AppImage file" >> release_notes.md
echo "2. Make it executable: \`chmod +x tunstun-release-*-x86_64.AppImage\`" >> release_notes.md
echo "3. Run: \`./tunstun-release-*-x86_64.AppImage\`" >> release_notes.md
- name: Debug release files
run: |
echo "=== Files that will be uploaded to release ==="
ls -la tunstun-release-*-x86_64.AppImage || echo "No release AppImage found!"
echo ""
echo "=== All AppImage files ==="
ls -la *.AppImage || echo "No AppImage files found!"
echo ""
echo "=== Working directory contents ==="
ls -la
echo ""
echo "=== File pattern test ==="
for file in tunstun-release-*-x86_64.AppImage; do
if [ -f "$file" ]; then
echo "Found release file: $file ($(du -h "$file" | cut -f1))"
else
echo "No files match pattern: tunstun-release-*-x86_64.AppImage"
fi
done
- name: Upload AppImage artifacts (both versions)
uses: actions/upload-artifact@v4
with:
name: tunstun-appimage-${{ github.sha }}
path: |
tunstun-*-x86_64.AppImage
release_notes.md
retention-days: 30
- name: Create Release (on main branch push)
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
uses: softprops/action-gh-release@v1
with:
tag_name: v1.0.0-build-${{ github.run_number }}
name: Tunstun v1.0.0 Build ${{ github.run_number }}
body_path: release_notes.md
draft: false
prerelease: true
files: |
tunstun-release-*-x86_64.AppImage
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}