diff --git a/.gitea/workflows/release.yaml b/.gitea/workflows/release.yaml index 85b9887..26ea950 100644 --- a/.gitea/workflows/release.yaml +++ b/.gitea/workflows/release.yaml @@ -112,4 +112,63 @@ jobs: env: CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }} run: | - npx wrangler pages deploy build/web --project-name="flux" --branch="main" \ No newline at end of file + npx wrangler pages deploy build/web --project-name="flux" --branch="main" + + # ----------------------------------------------------------------- + # JOB 4: LINUX APPIMAGE (Gira sul tuo PC Fedora / Linux Runner) + # ----------------------------------------------------------------- + build-linux: + runs-on: cross-runner # <--- Etichetta del tuo runner Linux / Fedora + steps: + - name: Checkout del codice + uses: actions/checkout@v3 + + - name: Crea file .env + run: | + cat << 'EOF' > .env + ${{ secrets.ENV_FILE_CONTENT }} + EOF + + - name: Build Flutter Linux + run: flutter build linux --release + + - name: Prepara AppDir per AppImage + run: | + mkdir -p build/Flux.AppDir + cp -r build/linux/x64/release/bundle/* build/Flux.AppDir/ + cp assets/icon/icon.png build/Flux.AppDir/flux.png + + cat << 'EOF' > build/Flux.AppDir/AppRun + #!/bin/sh + cd "$(dirname "$0")" + exec ./flux "$@" + EOF + chmod +x build/Flux.AppDir/AppRun + + cat << 'EOF' > build/Flux.AppDir/Flux.desktop + [Desktop Entry] + Version=1.0 + Type=Application + Terminal=false + Name=Flux + Exec=flux %u + Icon=flux + Categories=Utility; + EOF + + - name: Scarica appimagetool se non presente + run: | + if [ ! -f ./appimagetool-x86_64.AppImage ]; then + curl -L -o appimagetool-x86_64.AppImage https://github.com/AppImage/AppImageKit/releases/download/13/appimagetool-x86_64.AppImage + chmod +x appimagetool-x86_64.AppImage + fi + + - name: Genera AppImage + run: | + ARCH=x86_64 ./appimagetool-x86_64.AppImage build/Flux.AppDir Flux-x86_64.AppImage + + - name: Upload Linux AppImage Asset + uses: https://gitea.com/actions/release-action@main + with: + files: "Flux-x86_64.AppImage" + api_key: ${{ secrets.MYRELEASE_TOKEN }} \ No newline at end of file