diff --git a/.gitea/workflows/service-packs.yaml b/.gitea/workflows/service-packs.yaml index e8b51e1..008d538 100644 --- a/.gitea/workflows/service-packs.yaml +++ b/.gitea/workflows/service-packs.yaml @@ -11,10 +11,7 @@ on: jobs: build: - strategy: - matrix: - os: [macos, ubuntu] - runs-on: ${{ matrix.os }} + runs-on: macos steps: - name: Checkout code uses: actions/checkout@v6 @@ -34,7 +31,6 @@ jobs: if-no-files-found: ignore # Кэш для electron-builder (macOS) - name: Cache electron-builder (macOS) - if: matrix.os == 'macos' uses: actions/cache@v5 with: path: | @@ -45,19 +41,6 @@ jobs: ${{ runner.os }}-electron-builder- if-no-files-found: ignore - # Кэш для electron-builder (Ubuntu) - - name: Cache electron-builder (Ubuntu) - if: matrix.os == 'ubuntu' - uses: actions/cache@v5 - with: - path: | - ${{ env.HOME }}/.cache/electron-builder - ${{ env.HOME }}/.cache/electron - key: ${{ runner.os }}-electron-builder-${{ hashFiles('**/electron-builder.yml') }} - restore-keys: | - ${{ runner.os }}-electron-builder- - if-no-files-found: ignore - - name: NPM offline setup shell: bash run: | @@ -67,8 +50,16 @@ jobs: - name: Install npm dependencies run: npm install --prefer-offline --no-audit --no-fund + #Собираем Kernel чтобы свежие файлы попали в папку out - name: Build the application run: npm run kernel:linux + + #Собираем сервисные пакеты для всех платформ + - name: Build SP + shell: bash + run: | + chmod +x "$GITHUB_WORKSPACE/build-packs.sh" + sh "$GITHUB_WORKSPACE/build-packs.sh" #Загружаем на удаленный сервер по SSH используя scp и пароль из секретов #Загружаем из двух папок dist/builds/darwin/x64 и dist/builds/darwin/arm64, так как electron-builder может создавать разные файлы для разных архитектур - name: Upload to SSH diff --git a/build-packs.sh b/build-packs.sh index e9c2cde..0640b9a 100644 --- a/build-packs.sh +++ b/build-packs.sh @@ -1,8 +1,7 @@ #/bin/bash echo "Using directory: $(pwd)" current_dir=$(pwd) -# Run npm with a timeout using perl (cross-platform alternative to 'timeout') -perl -e 'alarm shift; $SIG{ALRM}=sub{kill INT => -$$}; exec @ARGV' 10 npm run start + echo "Build complete. Packing service packs..." APP_VERSION=$(grep -o 'APP_VERSION *= *"[^"]*' "$current_dir/app/version.ts" | sed 's/APP_VERSION *= *"//')