Skip to content

Commit 4550e5c

Browse files
authored
Merge pull request #362 from manosim/setup-electron-builder
* Move /dist to /build * Bump version 3.0.0 * Setup Electron Builder * Remove electron-packager * Trigger CircleCI * Setup Github Actions * Store artifact * Fix checkbox css * Restructure assets
2 parents 02e9b04 + cedf742 commit 4550e5c

29 files changed

+1093
-657
lines changed

.circleci/config.yml

Lines changed: 0 additions & 93 deletions
This file was deleted.

.github/workflows/main.yml

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
name: CI
2+
3+
on: [push]
4+
5+
jobs:
6+
setup:
7+
runs-on: ubuntu-18.04
8+
9+
steps:
10+
- uses: actions/checkout@v2
11+
12+
- name: Get yarn cache
13+
id: yarn-cache
14+
run: echo "::set-output name=dir::$(yarn cache dir)"
15+
16+
- uses: actions/cache@v1
17+
with:
18+
path: ${{ steps.yarn-cache.outputs.dir }}
19+
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
20+
restore-keys: |
21+
${{ runner.os }}-yarn-
22+
23+
- name: Install Dependencies
24+
run: yarn install
25+
26+
run-unit-tests:
27+
runs-on: ubuntu-18.04
28+
needs: setup
29+
30+
steps:
31+
- uses: actions/checkout@v2
32+
33+
- name: Get yarn cache
34+
id: yarn-cache
35+
run: echo "::set-output name=dir::$(yarn cache dir)"
36+
37+
- name: Install Dependencies
38+
run: yarn install
39+
40+
- name: Run Prettier (Check)
41+
run: yarn prettier-check
42+
43+
- name: Run Jest
44+
run: yarn test --coverage --runInBand
45+
46+
build-macos:
47+
runs-on: macos-10.15
48+
needs: setup
49+
50+
steps:
51+
- uses: actions/checkout@v2
52+
53+
- name: Get yarn cache
54+
id: yarn-cache
55+
run: echo "::set-output name=dir::$(yarn cache dir)"
56+
57+
- name: Install Dependencies
58+
run: yarn install
59+
60+
- name: Build
61+
run: yarn build
62+
63+
- name: Pack (electron-builder)
64+
run: yarn pack
65+
66+
- name: Make macOS (electron-builder)
67+
env:
68+
CSC_LINK: ${{ secrets.mac_certs }}
69+
CSC_KEY_PASSWORD: ${{ secrets.mac_certs_password }}
70+
run: yarn make:macos
71+
72+
- name: Clean up builds
73+
run: rm -rfv dist/mac dist/Gitify-*.dmg*
74+
75+
- uses: actions/upload-artifact@v1
76+
with:
77+
name: Gitify-dist
78+
path: dist

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,4 +77,4 @@ tmp/
7777
temp/
7878

7979
dist/
80-
Gitify-darwin-x64/
80+
build/

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
# Gitify [![circleci][circleci-image]][circleci-url] [![codecov][codecov-image]][codecov-url] [![downloads][downloads-image]][downloads-url]
1+
# Gitify [![github][github-image]][github-url] [![codecov][codecov-image]][codecov-url] [![downloads][downloads-image]][downloads-url]
22

33
> The mobile app has been depreacated in favor of the official GitHub mobile app the is coming out [soon](https://github.com/mobile).
44
5-
![Gitify](images/press.jpg)
5+
![Gitify](assets/images/press.jpg)
66

77
### Download
88

@@ -86,8 +86,8 @@ Since version `1.1.0` you can now debug Gitify by pressing `alt+cmd+I`. This wil
8686

8787
Gitify is licensed under the MIT Open Source license. For more information, see the LICENSE file in this repository.
8888

89-
[circleci-image]: https://circleci.com/gh/manosim/gitify.svg?style=svg
90-
[circleci-url]: https://circleci.com/gh/manosim/gitify
89+
[github-image]: https://github.com/manosim/gitify/workflows/CI/badge.svg
90+
[github-url]: https://circleci.com/gh/manosim/gitify
9191
[codecov-image]: https://codecov.io/gh/manosim/gitify/branch/master/graph/badge.svg
9292
[codecov-url]: https://codecov.io/gh/manosim/gitify
9393
[downloads-image]: https://img.shields.io/github/downloads/manosim/gitify/total.svg
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,5 @@
1212
<div id="gitify"></div>
1313
</body>
1414

15-
<script src="./dist/js/app.js"></script>
15+
<script src="./build/js/app.js"></script>
1616
</html>

main.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ const path = require('path');
44
const AutoLaunch = require('auto-launch');
55
const GhReleases = require('electron-gh-releases');
66

7-
const iconIdle = path.join(__dirname, 'images', 'tray-idleTemplate.png');
8-
const iconActive = path.join(__dirname, 'images', 'tray-active.png');
7+
const iconIdle = path.join(__dirname, 'assets', 'images', 'tray-idleTemplate.png');
8+
const iconActive = path.join(__dirname, 'assets', 'images', 'tray-active.png');
99

1010
const isDarwin = process.platform === 'darwin';
1111
const isLinux = process.platform === 'linux';

package.json

Lines changed: 34 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,8 @@
66
"scripts": {
77
"build": "webpack --config webpack.prod.js",
88
"watch": "webpack --config webpack.common.js --watch",
9-
"package": "electron-packager . Gitify --overwrite --platform=darwin --arch=x64 --electron-version=7.1.7 --asar --icon=images/app-icon.icns --ignore='src' --ignore='coverage'",
10-
"codesign": "bash scripts/codesign.bash",
11-
"dist": "yarn build && yarn package && yarn codesign",
9+
"pack": "electron-builder --dir",
10+
"make:macos": "electron-builder --mac",
1211
"prettier-check": "prettier --check 'src/**/*.{js,ts,tsx}'",
1312
"prettier": "prettier --single-quote --trailing-comma es5 --write 'src/**/*.{js,ts,tsx}'",
1413
"jest": "jest",
@@ -55,20 +54,39 @@
5554
}
5655
}
5756
},
57+
"build": {
58+
"appId": "com.electron.gitify",
59+
"productName": "Gitify",
60+
"files": [
61+
"build/**/*",
62+
"assets/**/*",
63+
"index.html",
64+
"LICENSE",
65+
"main.js"
66+
],
67+
"mac": {
68+
"category": "public.app-category.developer-tools",
69+
"icon": "assets/images/app-icon.icns",
70+
"identity": "Emmanouil Konstantinidis (3YP8SXP3BF)"
71+
},
72+
"dmg": {
73+
"icon": "assets/images/app-icon.icns"
74+
}
75+
},
5876
"dependencies": {
59-
"@primer/octicons-react": "^9.3.1",
77+
"@primer/octicons-react": "^9.4.0",
6078
"auto-launch": "=5.0.5",
61-
"axios": "=0.19.0",
62-
"date-fns": "^2.8.1",
79+
"axios": "=0.19.2",
80+
"date-fns": "^2.9.0",
6381
"electron-gh-releases": "=2.0.4",
64-
"final-form": "^4.18.6",
82+
"final-form": "^4.18.7",
6583
"lodash": "^4.17.15",
6684
"menubar": "^7.2.0",
6785
"nprogress": "=0.2.0",
6886
"react": "=16.12.0",
6987
"react-dom": "=16.12.0",
7088
"react-emojione": "=5.0.1",
71-
"react-final-form": "^6.3.3",
89+
"react-final-form": "^6.3.5",
7290
"react-redux": "=7.1.3",
7391
"react-router-dom": "^5.1.2",
7492
"react-transition-group": "^4.3.0",
@@ -78,23 +96,23 @@
7896
"redux-storage-decorator-filter": "=1.1.8",
7997
"redux-storage-engine-localstorage": "=1.1.4",
8098
"redux-thunk": "=2.3.0",
81-
"styled-components": "^4.4.1",
99+
"styled-components": "^5.0.0",
82100
"ts-loader": "^6.2.1",
83-
"typescript": "^3.7.4"
101+
"typescript": "^3.7.5"
84102
},
85103
"devDependencies": {
86104
"@testing-library/react": "^9.4.0",
87105
"@types/jest": "^24.0.25",
88106
"@types/lodash": "^4.14.149",
89107
"@types/node": "^12.12.21",
90-
"@types/react": "^16.9.17",
91-
"@types/react-redux": "^7.1.5",
108+
"@types/react": "^16.9.19",
109+
"@types/react-redux": "^7.1.7",
92110
"@types/react-transition-group": "^4.2.3",
93-
"@types/styled-components": "^4.4.1",
94-
"electron": "=7.1.9",
95-
"electron-packager": "=14.1.1",
111+
"@types/styled-components": "^4.4.2",
112+
"electron": "=7.1.11",
113+
"electron-builder": "^22.3.2",
96114
"jest": "^24.9.0",
97-
"nock": "=11.7.0",
115+
"nock": "=11.7.2",
98116
"prettier": "=1.19.1",
99117
"react-test-renderer": "=16.12.0",
100118
"redux-logger": "=3.0.6",

scripts/codesign.bash

Lines changed: 0 additions & 1 deletion
This file was deleted.

src/js/components/__snapshots__/account-notifications.test.tsx.snap

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
exports[`components/account-notifications.tsx should render itself (github.com with notifications) 1`] = `
44
<div
5-
className="sc-bdVaJa dCCnan"
5+
className="sc-AykKC hkjopf"
66
>
77
github.com
88
<svg
@@ -31,7 +31,7 @@ exports[`components/account-notifications.tsx should render itself (github.com w
3131

3232
exports[`components/account-notifications.tsx should render itself (github.com without notifications) 1`] = `
3333
<div
34-
className="sc-bdVaJa dCCnan"
34+
className="sc-AykKC hkjopf"
3535
>
3636
github.com
3737
<svg

src/js/components/__snapshots__/all-read.test.tsx.snap

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,18 @@
22

33
exports[`components/all-read.tsx should render itself & its children 1`] = `
44
<div
5-
className="sc-bdVaJa jZnlmR"
5+
className="sc-AykKC iqXGQ"
66
>
77
<div
8-
className="sc-bwzfXH flHJOa"
8+
className="sc-AykKD dxnFup"
99
>
1010
😉
1111
</div>
1212
<h2
13-
className="sc-htpNat XhagL"
13+
className="sc-AykKE kxNnyc"
1414
/>
1515
<h4
16-
className="sc-bxivhb ijKRfN"
16+
className="sc-AykKF hXdduO"
1717
>
1818
No new notifications.
1919
</h4>

src/js/components/__snapshots__/notification.test.tsx.snap

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22

33
exports[`components/notification.js should render itself & its children 1`] = `
44
<div
5-
className="sc-bdVaJa ctpORT"
5+
className="sc-AykKC geylAL"
66
>
77
<div
8-
className="sc-ifAKCX ePGmxi"
8+
className="sc-AykKG nSNMR"
99
>
1010
<svg
1111
aria-hidden="false"
@@ -31,17 +31,17 @@ exports[`components/notification.js should render itself & its children 1`] = `
3131
</svg>
3232
</div>
3333
<div
34-
className="sc-bwzfXH jcDBsP"
34+
className="sc-AykKD dWNlSI"
3535
onClick={[Function]}
3636
role="main"
3737
>
3838
<h6
39-
className="sc-htpNat VDmcF"
39+
className="sc-AykKE fsnEEy"
4040
>
4141
I am a robot and this is a test!
4242
</h6>
4343
<div
44-
className="sc-bxivhb blvFzN"
44+
className="sc-AykKF drOcmQ"
4545
>
4646
<span
4747
title="You're watching the repository."
@@ -54,10 +54,10 @@ exports[`components/notification.js should render itself & its children 1`] = `
5454
</div>
5555
</div>
5656
<div
57-
className="sc-ifAKCX ePGmxi"
57+
className="sc-AykKG nSNMR"
5858
>
5959
<button
60-
className="sc-EHOje dAXcTp"
60+
className="sc-AykKH iotryN"
6161
onClick={[Function]}
6262
>
6363
<svg

0 commit comments

Comments
 (0)