fix actions error #55
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build & Test | |
| on: | |
| push: | |
| branches: ["main"] | |
| pull_request: | |
| branches: ["main"] | |
| jobs: | |
| build-windows: | |
| name: Build Windows - ${{ matrix.arch }} (${{ matrix.compiler }}) | |
| runs-on: windows-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| arch: [x64, ARM64] | |
| compiler: [MSVC, MinGW] | |
| exclude: | |
| # MinGW doesn't support ARM64 | |
| - arch: ARM64 | |
| compiler: MinGW | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Setup .NET SDK | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: '8.0.x' | |
| - name: Setup MinGW (x64 only) | |
| if: matrix.compiler == 'MinGW' | |
| uses: msys2/setup-msys2@v2 | |
| with: | |
| msystem: MINGW64 | |
| update: true | |
| install: >- | |
| mingw-w64-x86_64-gcc | |
| mingw-w64-x86_64-make | |
| - name: Restore dependencies | |
| run: dotnet restore | |
| - name: Find project file | |
| id: find-project | |
| run: | | |
| $csproj = Get-ChildItem -Recurse -Filter "*.csproj" | Select-Object -First 1 | |
| if ($null -eq $csproj) { | |
| Write-Error "No .csproj file found" | |
| exit 1 | |
| } | |
| $projectPath = $csproj.FullName.Replace((Get-Location).Path + "\", "").Replace("\", "/") | |
| echo "PROJECT_PATH=$projectPath" >> $env:GITHUB_OUTPUT | |
| Write-Host "Found project: $projectPath" | |
| - name: Build with MSVC | |
| if: matrix.compiler == 'MSVC' | |
| run: | | |
| dotnet build ${{ steps.find-project.outputs.PROJECT_PATH }} ` | |
| --configuration Release ` | |
| --no-restore ` | |
| -p:RuntimeIdentifier=win-${{ matrix.arch }} ` | |
| - name: Build with MinGW | |
| if: matrix.compiler == 'MinGW' | |
| run: | | |
| $env:PATH = "C:\msys64\mingw64\bin;$env:PATH" | |
| dotnet build ${{ steps.find-project.outputs.PROJECT_PATH }} ` | |
| --configuration Release ` | |
| --no-restore ` | |
| -p:RuntimeIdentifier=win-x64 ` | |
| -p:UseMinGW=true | |
| - name: Run tests | |
| run: dotnet test --no-build --verbosity normal --configuration Release | |
| continue-on-error: true | |
| - name: Publish | |
| run: | | |
| $rid = "win-${{ matrix.arch }}" | |
| $compiler = "${{ matrix.compiler }}" | |
| dotnet publish ${{ steps.find-project.outputs.PROJECT_PATH }} ` | |
| -c Release ` | |
| -r $rid ` | |
| -p:SelfContained=true ` | |
| -p:PublishSingleFile=true ` | |
| -p:IncludeNativeLibrariesForSelfExtract=true ` | |
| -p:PublishTrimmed=false ` | |
| -p:DebugType=None ` | |
| -p:DebugSymbols=false ` | |
| -o artifacts/$compiler-$rid | |
| - name: Upload build artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: FrameExtractor-Windows-${{ matrix.arch }}-${{ matrix.compiler }} | |
| path: artifacts/${{ matrix.compiler }}-win-${{ matrix.arch }}/* | |
| retention-days: 7 | |
| build-linux-appimage: | |
| name: Build Linux AppImage - ${{ matrix.arch }} | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| arch: [x86_64] | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Setup .NET SDK | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: '8.0.x' | |
| - name: Install AppImage tools | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y wget fuse libfuse2 | |
| # Download appimagetool | |
| wget 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: Setup cross-compilation for ARM64 | |
| if: matrix.arch == 'aarch64' | |
| run: | | |
| sudo apt-get install -y gcc-aarch64-linux-gnu g++-aarch64-linux-gnu | |
| - name: Restore dependencies | |
| run: dotnet restore | |
| - name: Publish | |
| run: | | |
| # Find the .csproj file | |
| CSPROJ=$(find . -name "*.csproj" -type f | head -n 1) | |
| if [ -z "$CSPROJ" ]; then | |
| echo "Error: No .csproj file found" | |
| exit 1 | |
| fi | |
| echo "Building project: $CSPROJ" | |
| dotnet publish "$CSPROJ" \ | |
| -c Release \ | |
| -r $RID \ | |
| -p:SelfContained=true \ | |
| -p:PublishSingleFile=true \ | |
| -p:IncludeNativeLibrariesForSelfExtract=true \ | |
| -p:PublishTrimmed=false \ | |
| -p:DebugType=None \ | |
| -p:DebugSymbols=false \ | |
| -o publish/$RID | |
| - name: Create AppImage structure | |
| run: | | |
| # Find executable name | |
| EXECUTABLE=$(find publish/linux-x64 -maxdepth 1 -type f -executable | head -n 1) | |
| EXECUTABLE_NAME=$(basename "$EXECUTABLE") | |
| # Create AppDir structure | |
| mkdir -p AppDir/usr/bin | |
| mkdir -p AppDir/usr/share/applications | |
| mkdir -p AppDir/usr/share/icons/hicolor/256x256/apps | |
| mkdir -p AppDir/usr/share/metainfo | |
| # Copy application | |
| cp "$EXECUTABLE" AppDir/usr/bin/ | |
| chmod +x AppDir/usr/bin/"$EXECUTABLE_NAME" | |
| # Copy icon from repository (if exists) | |
| if [ -f "Assets/Icons/FrameExtractor_Icon.png" ]; then | |
| cp Assets/Icons/FrameExtractor_Icon.png AppDir/usr/share/icons/hicolor/256x256/apps/ | |
| cp Assets/Icons/FrameExtractor_Icon.png AppDir/ | |
| else | |
| # Create a placeholder 1x1 PNG if icon doesn't exist | |
| echo "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg==" | base64 -d > AppDir/usr/share/icons/hicolor/256x256/apps/FrameExtractor_Icon.png | |
| cp AppDir/usr/share/icons/hicolor/256x256/apps/FrameExtractor_Icon.png AppDir/ | |
| fi | |
| # Create desktop file | |
| cat > AppDir/FrameExtractor.desktop << 'EOF' | |
| [Desktop Entry] | |
| Type=Application | |
| Name=FrameExtractor | |
| Comment=Efortless video frame extraction | |
| Exec=FrameExtractor | |
| Icon=FrameExtractor_Icon | |
| Categories=AudioVideo;Video; | |
| Terminal=false | |
| EOF | |
| # Copy to proper location | |
| cp AppDir/frameextractor.desktop AppDir/usr/share/applications/ | |
| # Create AppStream metadata | |
| cat > AppDir/usr/share/metainfo/frameextractor.appdata.xml << 'EOF' | |
| <?xml version="1.0" encoding="UTF-8"?> | |
| <component type="desktop"> | |
| <id>com.frameextractor.FrameExtractor</id> | |
| <name>FrameExtractor</name> | |
| <summary>Efortless video frame extraction</summary> | |
| <description> | |
| <p>FrameExtractor is a modern, cross-platform video frame extractor with a beautiful GUI built using Avalonia UI and FFmpeg. It lets you extract frames from any video file with precise control over time range, FPS, output format, and naming.</p> | |
| </description> | |
| <launchable type="desktop-id">frameextractor.desktop</launchable> | |
| <url type="homepage">https://github.com/nokarin-dev/FrameExtractor</url> | |
| <provides> | |
| <binary>FrameExtractor</binary> | |
| </provides> | |
| <releases> | |
| <release version="1.0.8-test" date="2025-11-02"/> | |
| </releases> | |
| </component> | |
| EOF | |
| # Create AppRun | |
| cat > AppDir/AppRun << 'EOF' | |
| #!/bin/bash | |
| SELF=$(readlink -f "$0") | |
| HERE=${SELF%/*} | |
| export PATH="${HERE}/usr/bin:${PATH}" | |
| export LD_LIBRARY_PATH="${HERE}/usr/lib:${LD_LIBRARY_PATH}" | |
| exec "${HERE}/usr/bin/FrameExtractor" "$@" | |
| EOF | |
| chmod +x AppDir/AppRun | |
| # Debug: List AppDir contents | |
| echo "=== AppDir structure ===" | |
| ls -la AppDir/ | |
| echo "=== Desktop file check ===" | |
| cat AppDir/frameextractor.desktop | |
| - name: Build AppImage | |
| run: | | |
| # Build AppImage | |
| ARCH=x86_64 appimagetool AppDir FrameExtractor-x86_64.AppImage | |
| # Make executable | |
| chmod +x FrameExtractor-x86_64.AppImage | |
| - name: Upload AppImage artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: FrameExtractor-Linux-x86_64-AppImage | |
| path: FrameExtractor-x86_64.AppImage | |
| retention-days: 7 | |
| build-linux-native: | |
| name: Build Linux Native - ${{ matrix.arch }} | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| arch: [x64, arm64] | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Setup .NET SDK | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: '8.0.x' | |
| - name: Restore dependencies | |
| run: dotnet restore | |
| - name: Publish | |
| run: | | |
| # Find the .csproj file | |
| CSPROJ=$(find . -name "*.csproj" -type f | head -n 1) | |
| if [ -z "$CSPROJ" ]; then | |
| echo "Error: No .csproj file found" | |
| exit 1 | |
| fi | |
| echo "Building project: $CSPROJ" | |
| dotnet publish "$CSPROJ" \ | |
| -c Release \ | |
| -r linux-${{ matrix.arch }} \ | |
| -p:SelfContained=true \ | |
| -p:PublishSingleFile=true \ | |
| -p:IncludeNativeLibrariesForSelfExtract=true \ | |
| -p:PublishTrimmed=false \ | |
| -p:DebugType=None \ | |
| -p:DebugSymbols=false \ | |
| -o publish/linux-${{ matrix.arch }} | |
| - name: Upload build artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: FrameExtractor-Linux-${{ matrix.arch }}-Native | |
| path: publish/linux-${{ matrix.arch }}/* | |
| retention-days: 7 |