Clean up CI config for Electron builds
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user