From e16352c5d3146bc9dbc53a8735e3e1327c4d6505 Mon Sep 17 00:00:00 2001 From: Joan Date: Fri, 28 Nov 2025 10:39:49 +0100 Subject: [PATCH] Clean up CI config for Electron builds --- .gitlab-ci.yml | 72 ++++---------------------------------------------- 1 file changed, 5 insertions(+), 67 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f713f3d..2f5f800 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,25 +1,11 @@ stages: - - test - build-web - build-desktop variables: - # Cache configuration npm_config_cache: "$CI_PROJECT_DIR/.npm" ELECTRON_CACHE: "$CI_PROJECT_DIR/.cache/electron" -# Simple test job - NO TAGS - should run on any runner -test:runner: - stage: test - image: alpine:latest - script: - - echo "✅ Runner is working!" - - echo "Runner can execute jobs successfully" - - ls -la - rules: - - if: '$CI_PIPELINE_SOURCE == "push"' - -# Cache node_modules and electron cache cache: key: ${CI_COMMIT_REF_SLUG} paths: @@ -40,9 +26,9 @@ build:web: - pwa/dist/ expire_in: 1 hour rules: - - if: '$CI_COMMIT_TAG' # Run on tags - - if: '$CI_COMMIT_BRANCH == "main"' # Run on main branch - - if: '$CI_COMMIT_BRANCH == "develop"' # Run on develop branch + - if: '$CI_COMMIT_TAG' + tags: + - docker # Build Linux AppImage and .deb build:linux: @@ -60,7 +46,7 @@ build:linux: - pwa/dist-electron/*.deb expire_in: 1 week rules: - - if: '$CI_COMMIT_TAG' # Only run on tags + - if: '$CI_COMMIT_TAG' tags: - docker @@ -80,54 +66,6 @@ build:windows: - pwa/dist-electron/*.msi expire_in: 1 week rules: - - if: '$CI_COMMIT_TAG' # Only run on tags + - if: '$CI_COMMIT_TAG' tags: - docker - -# Build macOS (requires macOS runner - optional) -# Uncomment if you have a macOS runner available -# build:mac: -# stage: build-desktop -# dependencies: -# - build:web -# script: -# - cd pwa -# - npm ci -# - npm run electron:build:mac -# artifacts: -# paths: -# - pwa/dist-electron/*.dmg -# expire_in: 1 week -# rules: -# - if: '$CI_COMMIT_TAG' -# tags: -# - macos - -# Manual job to test builds without tags -build:manual: - stage: build-desktop - image: electronuserland/builder:wine - script: - - cd pwa - - npm ci - - npm run electron:build:linux - artifacts: - paths: - - pwa/dist-electron/ - expire_in: 1 day - when: manual - tags: - - docker - -# Test job to verify CI is working (no tags required) -test:ci: - stage: build-web - image: alpine:latest - script: - - echo "CI is working!" - - echo "Project directory:" - - ls -la - - echo "PWA directory:" - - ls -la pwa/ || echo "PWA directory not found" - rules: - - if: '$CI_PIPELINE_SOURCE == "push"' # Run on every push