Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Continuous Deployment of a electron app using GitLab

I am developing a desktop app on a Linux machine. The code is hosted on GitLab.com. I'd like a sample gitlab-ci.yml on building the app for Windows. I'm out of ideas on how to go about this, any assistance will be appreciated.

like image 246
Jimmy Obonyo Abor Avatar asked Sep 09 '26 12:09

Jimmy Obonyo Abor


1 Answers

The build steps depends on the library you are using to build the electron app. Here is a sample using electron-builder

// .gitlab-ci.yml
stages:
  - build

build:
  image: electronuserland/builder:wine
  stage: build
  script:
    - yarn
    - yarn dist:win
  artifacts:
    expire_in: 30 days
    paths:
      - ./dist/
  only:
    - master

// package.json
{
    ...
    "scripts": {
        ...
        "dist:win": "electron-builder -w",
    }
}
like image 90
Sagar Chakravarthy Avatar answered Sep 12 '26 16:09

Sagar Chakravarthy