From 32fb1c6e8c9aa11ad63f5118be1981a38363cc12 Mon Sep 17 00:00:00 2001 From: Jerome Thayananthajothy Date: Sat, 17 Aug 2024 21:12:12 +0100 Subject: [PATCH] Update GitHub Actions workflow and package dependencies --- .github/workflows/release.yml | 2 ++ package-lock.json | 13 +++++++++++++ package.json | 3 ++- src/main.ts | 3 +++ 4 files changed, 20 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2be6212..3866b19 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -26,6 +26,8 @@ jobs: - name: Build and Package the app run: npm run package + env: + NODE_ENV: production - name: Upload Build Artifacts uses: actions/upload-artifact@v2 diff --git a/package-lock.json b/package-lock.json index 462a0b3..556f21b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -15,6 +15,7 @@ "@vueuse/core": "^10.11.1", "class-variance-authority": "^0.7.0", "clsx": "^2.1.1", + "dotenv": "^16.4.5", "electron-squirrel-startup": "^1.0.1", "electron-updater": "^6.2.1", "ffmpeg-static": "^5.2.0", @@ -4446,6 +4447,18 @@ "node": ">=6.0.0" } }, + "node_modules/dotenv": { + "version": "16.4.5", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.4.5.tgz", + "integrity": "sha512-ZmdL2rui+eB2YwhsWzjInR8LldtZHGDoQ1ugH85ppHKwpUHL7j7rN0Ti9NCnGiQbhaZ11FpR+7ao1dNsmduNUg==", + "license": "BSD-2-Clause", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://dotenvx.com" + } + }, "node_modules/eastasianwidth": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", diff --git a/package.json b/package.json index f52bcf6..483a628 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,7 @@ "build:win": "npm_config_platform=win32 npm_config_arch=x64 npm install && electron-builder build --win", "package": "electron-forge package", "make": "electron-forge make", - "publish": "npx electron-forge publish --prerelease", + "publish": "electron-forge publish --prerelease", "dev": "electron-forge start", "lint": "eslint --ext .ts,.tsx ." }, @@ -36,6 +36,7 @@ "@vueuse/core": "^10.11.1", "class-variance-authority": "^0.7.0", "clsx": "^2.1.1", + "dotenv": "^16.4.5", "electron-squirrel-startup": "^1.0.1", "electron-updater": "^6.2.1", "ffmpeg-static": "^5.2.0", diff --git a/src/main.ts b/src/main.ts index 44329c7..2e5c8a8 100644 --- a/src/main.ts +++ b/src/main.ts @@ -14,6 +14,9 @@ import { Event } from './enums/event'; import { Channel } from './enums/channel'; import { Platform } from './enums/platform'; import { updateElectronApp } from './lib/auto-updater'; +import dotenv from 'dotenv'; + +dotenv.config(); updateElectronApp();