Successfully notarized my electron application for osx, but now the issue is that the apple id and app specific password are in the package.json. I of course don't want to hard code them there for distribution but can I use environment variables from say a .env file to replace them or how can I keep them secret in the package.json file?
I looked into dotenv and cross-env but I didn't see how the env variables could be used in a package.json file.
App was built using electron forge.
Structure (taken from the electron-forge docs) that I use:
{
"name": "my-app",
"version": "0.0.1",
"config": {
"forge": {
"packagerConfig": {
"osxSign": {
"identity": "Developer ID Application: Felix Rieseberg (LT94ZKYDCJ)",
"hardened-runtime": true,
"entitlements": "entitlements.plist",
"entitlements-inherit": "entitlements.plist",
"signature-flags": "library"
},
"osxNotarize": {
"appleId": "felix@felix.fun",
"appleIdPassword": "my-apple-id-password",
}
}
}
}
}
Thanks in advance.