Skip to content

Commit db689e0

Browse files
authored
fix: webpack dotenv loading (#2212)
* fix: webpack dotenv loading Signed-off-by: Adam Setch <adam.setch@outlook.com> * fix: webpack dotenv loading Signed-off-by: Adam Setch <adam.setch@outlook.com> --------- Signed-off-by: Adam Setch <adam.setch@outlook.com>
1 parent b2da212 commit db689e0

File tree

5 files changed

+185
-36
lines changed

5 files changed

+185
-36
lines changed

.github/workflows/build.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,15 @@ jobs:
3636
- name: Setup Node.js
3737
uses: ./.github/actions/setup-node
3838

39+
- name: Create .env for build
40+
shell: bash
41+
run: |
42+
{
43+
echo "APTABASE_KEY=${{ secrets.APTABASE_KEY }}"
44+
} > .env
45+
3946
- name: Build application
4047
run: pnpm build
41-
env:
42-
APTABASE_KEY: ${{ secrets.APTABASE_KEY }}
4348

4449
- name: Package for ${{ matrix.platform }}
4550
run: ${{ matrix.package-cmd }}

.github/workflows/publish.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,15 @@ jobs:
3737
- name: Setup Node.js
3838
uses: ./.github/actions/setup-node
3939

40+
- name: Create .env for build
41+
shell: bash
42+
run: |
43+
{
44+
echo "APTABASE_KEY=${{ secrets.APTABASE_KEY }}"
45+
} > .env
46+
4047
- name: Build application
4148
run: pnpm build
42-
env:
43-
APTABASE_KEY: ${{ secrets.APTABASE_KEY }}
4449

4550
- name: Package and publish for ${{ matrix.platform }}
4651
run: ${{ matrix.package-cmd }}

config/webpack.config.main.base.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ const configuration: webpack.Configuration = {
2121
filename: 'main.js',
2222
},
2323

24-
plugins: [new Dotenv({ systemvars: true })],
24+
plugins: [new Dotenv()],
2525
};
2626

2727
export default merge(baseConfig, configuration);

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
"dependencies": {
6161
"@aptabase/electron": "0.3.1",
6262
"electron-log": "5.4.3",
63-
"electron-updater": "6.7.3",
63+
"electron-updater": "6.8.1",
6464
"i18next": "25.8.0",
6565
"i18next-browser-languagedetector": "8.2.0",
6666
"menubar": "9.5.2",
@@ -117,7 +117,7 @@
117117
"date-fns": "4.1.0",
118118
"dotenv-webpack": "8.1.1",
119119
"electron": "40.1.0",
120-
"electron-builder": "26.4.0",
120+
"electron-builder": "26.6.0",
121121
"graphql": "16.12.0",
122122
"html-webpack-plugin": "5.6.6",
123123
"husky": "9.1.7",

0 commit comments

Comments
 (0)