Environment variables inside electron-builder

69 Views Asked by At
"extraFiles": [
            {
                "from": ".env",
                "to": "."
            }
        ],

I am using .env like this on local build.

"package": "npm run build && electron-builder build --win"

I have no issue in this. But I am using auto-updater using gitlab. My gitlab does not have any .env file So once my app gets updated with the build that the gitlab ci has created it will not include .env file How should I put my env variables so that it can use put using local build and pipeline build too.

I have put .env root folder of my installed app. It was there but when it got updated using installer created with gitlab pipeline my .env file got removed.

0

There are 0 best solutions below