Skip to content

Commit 49a5599

Browse files
committed
Move OAuth keys to env variables for CD through GitHub Actions
1 parent 4fa902f commit 49a5599

File tree

3 files changed

+13
-2
lines changed

3 files changed

+13
-2
lines changed

.github/workflows/release.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ jobs:
2727
run: yarn install
2828

2929
- name: Build
30+
env:
31+
OAUTH_CLIENT_ID: ${{ secrets.oauth_client_id }}
32+
OAUTH_CLIENT_SECRET: ${{ secrets.oauth_client_secret }}
3033
run: yarn build
3134

3235
- name: Pack (electron-builder)

src/js/utils/constants.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ export default {
44

55
DEFAULT_AUTH_OPTIONS: {
66
hostname: 'github.com',
7-
clientId: '3fef4433a29c6ad8f22c',
8-
clientSecret: '9670de733096c15322183ff17ed0fc8704050379',
7+
clientId: process.env.OAUTH_CLIENT_ID,
8+
clientSecret: process.env.OAUTH_CLIENT_SECRET,
99
},
1010

1111
REPO_SLUG: 'manosim/gitify',

webpack.common.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
const path = require('path');
2+
const webpack = require('webpack');
23

34
module.exports = {
45
mode: 'development',
@@ -14,6 +15,13 @@ module.exports = {
1415
},
1516
],
1617
},
18+
plugins: [
19+
new webpack.EnvironmentPlugin({
20+
// Development Keys - See README.md
21+
OAUTH_CLIENT_ID: '3fef4433a29c6ad8f22c',
22+
OAUTH_CLIENT_SECRET: '9670de733096c15322183ff17ed0fc8704050379',
23+
}),
24+
],
1725
resolve: {
1826
extensions: ['.tsx', '.ts', '.js'],
1927
},

0 commit comments

Comments
 (0)