Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 36 additions & 2 deletions .github/workflows/build-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
env:
CSC_LINK: ${{ secrets.mac_certs }}
CSC_KEY_PASSWORD: ${{ secrets.mac_certs_password }}
run: yarn make:macos -c.mac.identity=null
run: yarn make:macos --publish=never -c.mac.identity=null

- name: Clean up builds
run: rm -rfv dist/mac
Expand Down Expand Up @@ -64,7 +64,7 @@ jobs:
run: yarn build

- name: Make Windows (electron-builder)
run: yarn make:win
run: yarn make:win --publish=never

- name: Clean up builds
run: Remove-Item dist/win-unpacked -Recurse
Expand All @@ -73,3 +73,37 @@ jobs:
with:
name: Gitify-dist-win
path: dist

build-linux:
runs-on: ubuntu-18.04

steps:
- uses: actions/checkout@v2

- name: Get yarn cache
id: yarn-cache
run: echo "::set-output name=dir::$(yarn cache dir)"

- uses: actions/cache@v1
with:
path: ${{ steps.yarn-cache.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-

- name: Install Dependencies
run: yarn install

- name: Build
run: yarn build

- name: Make Linux (electron-builder)
run: yarn make:linux --publish=never

- name: Clean up builds
run: rm -rfv dist/linux-unpacked

- uses: actions/upload-artifact@v1
with:
name: Gitify-dist-linux
path: dist
31 changes: 31 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,3 +72,34 @@ jobs:
env:
GH_TOKEN: ${{ secrets.gh_token }}
run: yarn make:win --publish onTagOrDraft

release-linux:
runs-on: ubuntu-18.04

steps:
- uses: actions/checkout@v2

- name: Get yarn cache
id: yarn-cache
run: echo "::set-output name=dir::$(yarn cache dir)"

- uses: actions/cache@v1
with:
path: ${{ steps.yarn-cache.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-

- name: Install Dependencies
run: yarn install

- name: Build
env:
OAUTH_CLIENT_ID: ${{ secrets.oauth_client_id }}
OAUTH_CLIENT_SECRET: ${{ secrets.oauth_client_secret }}
run: yarn build

- name: Publish Linuxs (electron-builder)
env:
GH_TOKEN: ${{ secrets.gh_token }}
run: yarn make:linux --publish onTagOrDraft
2 changes: 2 additions & 0 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,5 @@ jobs:

- name: Run Jest
run: yarn test --coverage --runInBand

- uses: codecov/codecov-action@v1
29 changes: 19 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@
"scripts": {
"build": "webpack --config webpack.prod.js",
"watch": "webpack --config webpack.common.js --watch",
"make:win": "electron-builder --win",
"make:linux": "electron-builder --linux",
"make:macos": "electron-builder --mac",
"make:win": "electron-builder --win",
"prettier-check": "prettier --check 'src/**/*.{js,ts,tsx}'",
"prettier": "prettier --single-quote --trailing-comma es5 --write 'src/**/*.{js,ts,tsx}'",
"jest": "jest",
Expand Down Expand Up @@ -93,21 +94,29 @@
"nsis": {
"oneClick": false
},
"linux": {
"target": [
"AppImage",
"deb"
],
"category": "Development",
"maintainer": "Emmanouil Konstantinidis"
},
"afterSign": "scripts/notarize.js"
},
"dependencies": {
"@primer/octicons-react": "^9.6.0",
"axios": "=0.19.2",
"date-fns": "^2.11.1",
"electron-updater": "^4.2.5",
"final-form": "^4.18.7",
"final-form": "^4.19.1",
"lodash": "^4.17.15",
"menubar": "^8.0.1",
"nprogress": "=0.2.0",
"react": "=16.13.1",
"react-dom": "=16.13.1",
"react-emojione": "=5.0.1",
"react-final-form": "^6.3.5",
"react-final-form": "^6.4.0",
"react-is": "^16.13.1",
"react-redux": "=7.2.0",
"react-router-dom": "^5.1.2",
Expand All @@ -123,24 +132,24 @@
"typescript": "^3.8.3"
},
"devDependencies": {
"@testing-library/react": "^10.0.1",
"@types/jest": "^25.1.4",
"@testing-library/react": "^10.0.2",
"@types/jest": "^25.2.1",
"@types/lodash": "^4.14.149",
"@types/node": "^13.9.5",
"@types/react": "^16.9.26",
"@types/node": "^13.11.0",
"@types/react": "^16.9.32",
"@types/react-redux": "^7.1.7",
"@types/react-transition-group": "^4.2.4",
"@types/styled-components": "^5.0.1",
"electron": "^8.2.0",
"electron-builder": "^22.4.1",
"electron-notarize": "^0.2.1",
"jest": "^25.2.3",
"electron-notarize": "^0.3.0",
"jest": "^25.2.7",
"nock": "^12.0.3",
"prettier": "=2.0.2",
"react-test-renderer": "=16.13.1",
"redux-logger": "=3.0.6",
"redux-mock-store": "=1.5.4",
"ts-jest": "^25.2.1",
"ts-jest": "^25.3.1",
"webpack": "^4.42.1",
"webpack-cli": "^3.3.11",
"webpack-merge": "^4.2.2"
Expand Down
3 changes: 3 additions & 0 deletions src/js/__mocks__/electron.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ module.exports = {
remote: {
BrowserWindow: () => browserWindow,
dialog: dialog,
process: {
platform: 'darwin',
},
app: {
getVersion: () => '0.0.1',
getLoginItemSettings: jest.fn(),
Expand Down
24 changes: 13 additions & 11 deletions src/js/routes/settings.tsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
const { ipcRenderer } = require('electron');
const { ipcRenderer, remote } = require('electron');

import * as React from 'react';
import { connect } from 'react-redux';
import styled from 'styled-components';

const { remote } = require('electron');

import { AppState, SettingsState } from '../../types/reducers';
import { fetchNotifications, updateSetting, logout } from '../actions';
import { FieldCheckbox } from '../components/ui/checkbox';
import { updateTrayIcon } from '../utils/comms';

const isLinux = remote.process.platform === 'linux';

const Wrapper = styled.div`
display: flex;
flex-direction: column;
Expand Down Expand Up @@ -167,14 +167,16 @@ export class SettingsRoute extends React.Component<IProps> {
this.props.updateSetting('markOnClick', evt.target.checked)
}
/>
<FieldCheckbox
name="openAtStartUp"
label="Open at startup"
checked={settings.openAtStartup}
onChange={(evt) =>
this.props.updateSetting('openAtStartup', evt.target.checked)
}
/>
{!isLinux && (
<FieldCheckbox
name="openAtStartUp"
label="Open at startup"
checked={settings.openAtStartup}
onChange={(evt) =>
this.props.updateSetting('openAtStartup', evt.target.checked)
}
/>
)}
</Main>

<Footer>
Expand Down
Loading