From ef5dd82c790cbedffba971f7250a779eb0a1ac1f Mon Sep 17 00:00:00 2001
From: cv <34649812+cpvalente@users.noreply.github.com>
Date: Sat, 5 Jun 2021 16:13:51 +0200
Subject: [PATCH 01/17] lazy load main components
---
client/src/features/editors/Editor.jsx | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/client/src/features/editors/Editor.jsx b/client/src/features/editors/Editor.jsx
index 7490f0439..fbbd9e0d5 100644
--- a/client/src/features/editors/Editor.jsx
+++ b/client/src/features/editors/Editor.jsx
@@ -1,15 +1,18 @@
+import { lazy, useEffect } from 'react';
import { Heading } from '@chakra-ui/layout';
import { Box } from '@chakra-ui/layout';
import NumberedText from 'common/components/text/NumberedText';
-import PlaybackControl from '../control/PlaybackControl';
-import MessageControl from '../control/MessageControl';
import styles from './Editor.module.css';
-import EventListWrapper from './list/EventListWrapper';
import { useDisclosure } from '@chakra-ui/hooks';
import SettingsModal from '../modals/SettingsModal';
-import { useEffect } from 'react';
import MenuBar from 'features/menu/MenuBar';
+const EventListWrapper = lazy(() =>
+ import('features/editors/list/EventListWrapper')
+);
+const PlaybackControl = lazy(() => import('features/control/PlaybackButtons'));
+const MessageControl = lazy(() => import('features/control/MessageControl'));
+
export default function Editor() {
const { isOpen, onOpen, onClose } = useDisclosure();
From 11b6498760d5442a97da2feafa5fdb13956ea753 Mon Sep 17 00:00:00 2001
From: cv <34649812+cpvalente@users.noreply.github.com>
Date: Tue, 8 Jun 2021 13:26:31 +0200
Subject: [PATCH 02/17] styles: muly
- change progressbar (show countdown instead of ellapsed)
- fix issue where it would not refresh if there was no time
- add style countdown to red background
---
.../components/myProgressBar/MyProgressBar.jsx | 15 ++++++++++-----
.../myProgressBar/MyProgressBar.module.css | 13 +++++++++++--
.../features/viewers/presenter/PresenterView.jsx | 6 +-----
3 files changed, 22 insertions(+), 12 deletions(-)
diff --git a/client/src/common/components/myProgressBar/MyProgressBar.jsx b/client/src/common/components/myProgressBar/MyProgressBar.jsx
index dda5e48c6..e7006cdaa 100644
--- a/client/src/common/components/myProgressBar/MyProgressBar.jsx
+++ b/client/src/common/components/myProgressBar/MyProgressBar.jsx
@@ -3,16 +3,21 @@ import styles from './MyProgressBar.module.css';
export default function MyProgressBar(props) {
const { now, complete, showElapsed } = props;
- const percentComplete = showElapsed
- ? clamp((100 - (now * 100) / complete), 0, 100)
- : clamp((now * 100) / complete, 0, 100)
+
+ let percentComplete = showElapsed ? 0 : 100;
+
+ if (now != null && complete != null) {
+ percentComplete = showElapsed
+ ? clamp(100 - (now * 100) / complete, 0, 100)
+ : clamp((now * 100) / complete, 0, 100);
+ }
return (
-
+
);
}
diff --git a/client/src/common/components/myProgressBar/MyProgressBar.module.css b/client/src/common/components/myProgressBar/MyProgressBar.module.css
index 6cfcb0c25..1a24b7fd4 100644
--- a/client/src/common/components/myProgressBar/MyProgressBar.module.css
+++ b/client/src/common/components/myProgressBar/MyProgressBar.module.css
@@ -1,13 +1,22 @@
-.progress {
+.progress,
+.progressCountdown {
height: 2vh;
background-color: rgba(255, 255, 255, 0.13);
border-radius: 4px;
}
+.progress {
+ background-color: rgba(255, 255, 255, 0.13);
+}
+
+.progressCountdown {
+ background-color: #ff7597;
+}
+
.progressBar {
width: 100%;
height: 2vh;
- background-color: rgba(255, 255, 255, 0.79);
+ background-color: rgb(255, 255, 255);
border-radius: 4px;
transition: 1s linear;
transition-property: width;
diff --git a/client/src/features/viewers/presenter/PresenterView.jsx b/client/src/features/viewers/presenter/PresenterView.jsx
index 53a74faab..edb8bb92b 100644
--- a/client/src/features/viewers/presenter/PresenterView.jsx
+++ b/client/src/features/viewers/presenter/PresenterView.jsx
@@ -71,11 +71,7 @@ export default function PresenterView(props) {
isPlaying ? style.progressContainer : style.progressContainerPaused
}
>
-
+
)}
From 52c8bafc2ca3b75671134b96d9b543a4cdde5ca3 Mon Sep 17 00:00:00 2001
From: cv <34649812+cpvalente@users.noreply.github.com>
Date: Wed, 9 Jun 2021 22:30:16 +0200
Subject: [PATCH 03/17] feat: lower reloads on change of data
---
client/src/features/editors/Editor.jsx | 2 +-
.../viewers/production/lower/LowerClean.jsx | 1 +
.../viewers/production/lower/LowerLines.jsx | 6 +++
.../viewers/production/lower/LowerWrapper.jsx | 38 +++++++++++++++++--
4 files changed, 43 insertions(+), 4 deletions(-)
diff --git a/client/src/features/editors/Editor.jsx b/client/src/features/editors/Editor.jsx
index fbbd9e0d5..5571dd728 100644
--- a/client/src/features/editors/Editor.jsx
+++ b/client/src/features/editors/Editor.jsx
@@ -10,7 +10,7 @@ import MenuBar from 'features/menu/MenuBar';
const EventListWrapper = lazy(() =>
import('features/editors/list/EventListWrapper')
);
-const PlaybackControl = lazy(() => import('features/control/PlaybackButtons'));
+const PlaybackControl = lazy(() => import('features/control/PlaybackControl'));
const MessageControl = lazy(() => import('features/control/MessageControl'));
export default function Editor() {
diff --git a/client/src/features/viewers/production/lower/LowerClean.jsx b/client/src/features/viewers/production/lower/LowerClean.jsx
index 780a3e1ef..fb9fc8c40 100644
--- a/client/src/features/viewers/production/lower/LowerClean.jsx
+++ b/client/src/features/viewers/production/lower/LowerClean.jsx
@@ -33,6 +33,7 @@ export default function LowerClean(props) {
// calculate transition times
useEffect(() => {});
+
// Format messages
const showLowerMessage = lower.text !== '' && lower.visible;
diff --git a/client/src/features/viewers/production/lower/LowerLines.jsx b/client/src/features/viewers/production/lower/LowerLines.jsx
index 7c2c28d66..714822a4b 100644
--- a/client/src/features/viewers/production/lower/LowerLines.jsx
+++ b/client/src/features/viewers/production/lower/LowerLines.jsx
@@ -12,6 +12,8 @@ export default function LowerLines(props) {
};
const [showLower, setShowLower] = useState(true);
+ console.log('DEBUG TITLE SHOW:', title.showNow);
+
// Unmount if fadeOut
useEffect(() => {
if (!options.fadeOut) return;
@@ -30,6 +32,10 @@ export default function LowerLines(props) {
return () => clearTimeout(timeout);
}, [options.fadeOut, options.transitionIn, defaults.transitionIn]);
+ useEffect(() => {
+ setShowLower(title.showNow);
+ }, [title.showNow]);
+
// Format messages
const showLowerMessage = lower.text !== '' && lower.visible;
diff --git a/client/src/features/viewers/production/lower/LowerWrapper.jsx b/client/src/features/viewers/production/lower/LowerWrapper.jsx
index 0ee5cae91..8d9e3385c 100644
--- a/client/src/features/viewers/production/lower/LowerWrapper.jsx
+++ b/client/src/features/viewers/production/lower/LowerWrapper.jsx
@@ -3,6 +3,8 @@ import LowerClean from './LowerClean';
import LowerLines from './LowerLines';
export default function Lower(props) {
+ const { title, ...rest } = props;
+ const [titles, setTitles] = useState(null);
const [preset, setPreset] = useState(1);
const [lowerOptions, setLowerOptions] = useState({});
@@ -11,6 +13,36 @@ export default function Lower(props) {
document.title = 'ontime - Lower Thirds';
}, []);
+ // reload if data changes
+ useEffect(() => {
+ // clear titles if necessary
+ // will trigger an animation out in the component
+ let timeout = null;
+ if (
+ title?.titleNow !== titles?.titleNow ||
+ title?.subtitleNow !== titles?.subtitleNow ||
+ title?.presenterNow !== titles?.presenterNow
+ ) {
+ console.log('DEBUG TITLES: SETTING TITLES TO NULL');
+ setTitles((t) => ({ ...t, showNow: false }));
+
+ const transitionTime = 2000;
+
+ timeout = setTimeout(() => {
+ console.log('DEBUG TITLES: RESUMING');
+ setTitles(title);
+ }, transitionTime);
+ }
+
+ return () => {
+ if (timeout != null) {
+ console.log('DEBUG TITLES: CLEARING');
+
+ clearTimeout(timeout);
+ }
+ };
+ }, [title.titleNow, title.subtitleNow, title.presenterNow]);
+
// TODO: sanitize data
// getting config from URL: preset, size, transition, bg, text, key
// eg. http://localhost:3000/lower?bg=ff2&text=f00&size=0.6&transition=5
@@ -77,10 +109,10 @@ export default function Lower(props) {
switch (preset) {
case 0:
- return
{page.map((e) => {
- if (selectedState === 1) selectedState = 2;
- if (e.id === selected) selectedState = 1;
- else if (e.id > selected) selectedState = 2;
+ if (e.id === selectedId) selectedState = 1;
+ else if (selectedState === 1) selectedState = 2;
return (
);
})}
From 256c33393c3382df0d4a366138a1328d2e0e0970 Mon Sep 17 00:00:00 2001
From: cv <34649812+cpvalente@users.noreply.github.com>
Date: Thu, 10 Jun 2021 21:00:53 +0200
Subject: [PATCH 07/17] style: display private
style changes to display private events
---
.../src/common/components/views/Paginator.jsx | 2 --
.../components/views/Paginator.module.css | 32 +++++++++++++++----
.../src/common/components/views/TodayItem.jsx | 10 ++++--
3 files changed, 32 insertions(+), 12 deletions(-)
diff --git a/client/src/common/components/views/Paginator.jsx b/client/src/common/components/views/Paginator.jsx
index 5ba8b8881..2412b49bd 100644
--- a/client/src/common/components/views/Paginator.jsx
+++ b/client/src/common/components/views/Paginator.jsx
@@ -32,8 +32,6 @@ export default function Paginator(props) {
// if array is completely in past, show depending on SCROLL_PAST
}, [events, selPage, LIMIT_PER_PAGE]);
- console.log('debug events', events);
-
// every SCROLL_TIME go to the next array
useInterval(() => {
if (numEvents > LIMIT_PER_PAGE) {
diff --git a/client/src/common/components/views/Paginator.module.css b/client/src/common/components/views/Paginator.module.css
index e52e2dcfc..5e58e99ad 100644
--- a/client/src/common/components/views/Paginator.module.css
+++ b/client/src/common/components/views/Paginator.module.css
@@ -26,11 +26,13 @@
margin-left: 0.5vw;
}
-.entryStart,
-.entryEnd {
+.entryTimes {
font-family: 'Open Sans', sans-serif;
- min-width: 5vw;
+ font-size: 1.4vw;
+
+ min-width: 10vw;
opacity: 0.9;
+ letter-spacing: 0.035em;
}
.entryTitle {
@@ -40,26 +42,42 @@
.entryPast,
.entryNow,
.entryFuture {
- background-color: rgba(255, 255, 255, 0.03);
display: flex;
font-size: 1.3vw;
padding: 0.2vh 1vw;
margin-bottom: 1.5vh;
+ border-radius: 3px;
}
.entryPast {
- color: #aaa;
+ background-color: rgba(255, 255, 255, 0.01);
font-size: 1.2vw;
}
+.entryPast > .entryTitle {
+ color: #999;
+}
+
.entryFuture {
+ background-color: rgba(255, 255, 255, 0.03);
color: #ddd;
}
.entryNow {
color: #fff;
line-height: 5vh;
- background-color: rgba(255, 255, 255, 0.09);
+ background-color: rgba(255, 255, 255, 0.07);
border-bottom: 0.5vh solid #ff7597aa;
- margin-left: -0.5vw;
+ margin-left: -0.5em;
+ padding-left: 0.5em;
+}
+
+.backstageInd {
+ color: #ff7597aa;
+ margin-left: auto;
+ margin-right: -0.5vw;
+}
+
+.backstageInd::before {
+ content: '*';
}
diff --git a/client/src/common/components/views/TodayItem.jsx b/client/src/common/components/views/TodayItem.jsx
index 04848cb9d..3238e9e2c 100644
--- a/client/src/common/components/views/TodayItem.jsx
+++ b/client/src/common/components/views/TodayItem.jsx
@@ -1,7 +1,7 @@
import { stringFromMillis } from 'common/dateConfig';
import style from './Paginator.module.css';
export default function TodayItem(props) {
- const { selected, timeStart, timeEnd, title } = props;
+ const { selected, timeStart, timeEnd, title, backstageEvent } = props;
// Format timers
const start = stringFromMillis(timeStart, false) || '';
@@ -13,9 +13,13 @@ export default function TodayItem(props) {
else if (selected === 2) selectStyle = style.entryFuture;
return (
-
{start}
-
{end}
+
{`${start} ยท ${end}`}
{title}
+ {backstageEvent &&
}
);
}
From 7e5d5982bf95bd66994f272f13800a1d5d930bc8 Mon Sep 17 00:00:00 2001
From: Carlos Valente <34649812+cpvalente@users.noreply.github.com>
Date: Fri, 11 Jun 2021 22:07:48 +0200
Subject: [PATCH 08/17] Create autobuild.yml
---
.github/workflows/autobuild.yml | 50 +++++++++++++++++++++++++++++++++
1 file changed, 50 insertions(+)
create mode 100644 .github/workflows/autobuild.yml
diff --git a/.github/workflows/autobuild.yml b/.github/workflows/autobuild.yml
new file mode 100644
index 000000000..6f2b6f413
--- /dev/null
+++ b/.github/workflows/autobuild.yml
@@ -0,0 +1,50 @@
+# This is a basic workflow to help you get started with Actions
+
+name: CI
+
+# Controls when the action will run.
+on:
+ push:
+ # Pattern matched against refs/tags
+ tags:
+ # Push events to every tag not containing /
+ - '*'
+
+ # Allows you to run this workflow manually from the Actions tab
+ workflow_dispatch:
+
+# A workflow run is made up of one or more jobs that can run sequentially or in parallel
+jobs:
+ # This workflow contains a single job called "build"
+ build:
+ # The type of runner that the job will run on
+ runs-on: windows-latest
+
+ # Steps represent a sequence of tasks that will be executed as part of the job
+ steps:
+ # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
+ - uses: actions/checkout@v2
+
+ - name: Use Node.js
+ uses: actions/setup-node@v1
+ with:
+ node-version: '14.x'
+
+ # install and build react
+ - run: yarn install
+ working-directory: ./client
+ - run: yarn build
+ working-directory: ./client
+
+ # install and build electron
+ - run: yarn install
+ working-directory: ./server
+ - run: yarn dist-win
+ working-directory: ./server
+
+ # handle artifact
+ - uses: actions/upload-artifact@v2
+ with:
+ name: wininstaller-64.exe
+ path: ./server/dist/ontime-win64.exe
+
From b5f75191b4d96241c84b88fc4ac8f0156ba6cc4b Mon Sep 17 00:00:00 2001
From: Carlos Valente <34649812+cpvalente@users.noreply.github.com>
Date: Fri, 11 Jun 2021 22:21:54 +0200
Subject: [PATCH 09/17] Update autobuild.yml
- disable CI, avoid warnings as errors
---
.github/workflows/autobuild.yml | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/.github/workflows/autobuild.yml b/.github/workflows/autobuild.yml
index 6f2b6f413..3b897b3e2 100644
--- a/.github/workflows/autobuild.yml
+++ b/.github/workflows/autobuild.yml
@@ -19,6 +19,8 @@ jobs:
build:
# The type of runner that the job will run on
runs-on: windows-latest
+ env:
+ CI: false
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
@@ -31,15 +33,19 @@ jobs:
node-version: '14.x'
# install and build react
- - run: yarn install
+ - name: Install React dependencies
+ run: yarn install
working-directory: ./client
- - run: yarn build
+ - name: Build React App
+ run: yarn build
working-directory: ./client
# install and build electron
- - run: yarn install
+ - name: Install Electron + nodejs dependencies
+ run: yarn install
working-directory: ./server
- - run: yarn dist-win
+ - name: Build Electron App
+ run: yarn dist-win
working-directory: ./server
# handle artifact
From 9da62a2674544f4a14e452013fd81cf263a1a742 Mon Sep 17 00:00:00 2001
From: Carlos Valente <34649812+cpvalente@users.noreply.github.com>
Date: Fri, 11 Jun 2021 22:28:22 +0200
Subject: [PATCH 10/17] Update autobuild.yml
- still trying to fix CI
---
.github/workflows/autobuild.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/autobuild.yml b/.github/workflows/autobuild.yml
index 3b897b3e2..1ca4a8725 100644
--- a/.github/workflows/autobuild.yml
+++ b/.github/workflows/autobuild.yml
@@ -20,7 +20,7 @@ jobs:
# The type of runner that the job will run on
runs-on: windows-latest
env:
- CI: false
+ CI: ''
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
From cd62c0b8ea261e95fe880b6a197c9df4879e6a19 Mon Sep 17 00:00:00 2001
From: Carlos Valente <34649812+cpvalente@users.noreply.github.com>
Date: Fri, 11 Jun 2021 22:35:57 +0200
Subject: [PATCH 11/17] Update autobuild.yml
still....
---
.github/workflows/autobuild.yml | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/.github/workflows/autobuild.yml b/.github/workflows/autobuild.yml
index 1ca4a8725..12481277f 100644
--- a/.github/workflows/autobuild.yml
+++ b/.github/workflows/autobuild.yml
@@ -19,8 +19,6 @@ jobs:
build:
# The type of runner that the job will run on
runs-on: windows-latest
- env:
- CI: ''
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
@@ -37,7 +35,7 @@ jobs:
run: yarn install
working-directory: ./client
- name: Build React App
- run: yarn build
+ run: CI='' yarn build
working-directory: ./client
# install and build electron
@@ -45,7 +43,7 @@ jobs:
run: yarn install
working-directory: ./server
- name: Build Electron App
- run: yarn dist-win
+ run: CI='' yarn dist-win
working-directory: ./server
# handle artifact
From e8fdf64ebfe1ca86884f0afaffed4d6b55e3f972 Mon Sep 17 00:00:00 2001
From: Carlos Valente <34649812+cpvalente@users.noreply.github.com>
Date: Fri, 11 Jun 2021 22:55:06 +0200
Subject: [PATCH 12/17] Update autobuild.yml
...
---
.github/workflows/autobuild.yml | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/.github/workflows/autobuild.yml b/.github/workflows/autobuild.yml
index 12481277f..ff65326bf 100644
--- a/.github/workflows/autobuild.yml
+++ b/.github/workflows/autobuild.yml
@@ -19,6 +19,8 @@ jobs:
build:
# The type of runner that the job will run on
runs-on: windows-latest
+ env:
+ CI: ''
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
@@ -35,7 +37,7 @@ jobs:
run: yarn install
working-directory: ./client
- name: Build React App
- run: CI='' yarn build
+ run: yarn build
working-directory: ./client
# install and build electron
@@ -43,7 +45,7 @@ jobs:
run: yarn install
working-directory: ./server
- name: Build Electron App
- run: CI='' yarn dist-win
+ run: yarn dist-win
working-directory: ./server
# handle artifact
From 78a787b7b334305c94e033be23d011ff1d1d4d17 Mon Sep 17 00:00:00 2001
From: Carlos Valente <34649812+cpvalente@users.noreply.github.com>
Date: Fri, 11 Jun 2021 23:11:36 +0200
Subject: [PATCH 13/17] Update autobuild.yml
- release exe
---
.github/workflows/autobuild.yml | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/.github/workflows/autobuild.yml b/.github/workflows/autobuild.yml
index ff65326bf..3a5c47970 100644
--- a/.github/workflows/autobuild.yml
+++ b/.github/workflows/autobuild.yml
@@ -48,9 +48,7 @@ jobs:
run: yarn dist-win
working-directory: ./server
- # handle artifact
- - uses: actions/upload-artifact@v2
- with:
- name: wininstaller-64.exe
- path: ./server/dist/ontime-win64.exe
+ # release
+ - name: Release
+ uses: softprops/action-gh-release@v1
From 89ba4200dcfbefa7966331088bb183f3862bd023 Mon Sep 17 00:00:00 2001
From: Carlos Valente <34649812+cpvalente@users.noreply.github.com>
Date: Fri, 11 Jun 2021 23:22:31 +0200
Subject: [PATCH 14/17] Update autobuild.yml
- fixing token
---
.github/workflows/autobuild.yml | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/autobuild.yml b/.github/workflows/autobuild.yml
index 3a5c47970..b187feea2 100644
--- a/.github/workflows/autobuild.yml
+++ b/.github/workflows/autobuild.yml
@@ -51,4 +51,5 @@ jobs:
# release
- name: Release
uses: softprops/action-gh-release@v1
-
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
From e4d0889a699e485ff2ec87d78025ada8134907ea Mon Sep 17 00:00:00 2001
From: Carlos Valente <34649812+cpvalente@users.noreply.github.com>
Date: Fri, 11 Jun 2021 23:34:02 +0200
Subject: [PATCH 15/17] Update autobuild.yml
fix file path
---
.github/workflows/autobuild.yml | 2 ++
1 file changed, 2 insertions(+)
diff --git a/.github/workflows/autobuild.yml b/.github/workflows/autobuild.yml
index b187feea2..54e1a2ba5 100644
--- a/.github/workflows/autobuild.yml
+++ b/.github/workflows/autobuild.yml
@@ -51,5 +51,7 @@ jobs:
# release
- name: Release
uses: softprops/action-gh-release@v1
+ with:
+ files: ./server/dist/ontime-win64.exe
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
From 0f360eabfc0ffdcd2f7db57779ca41fdcf735712 Mon Sep 17 00:00:00 2001
From: lightdev
Date: Sat, 12 Jun 2021 19:33:15 +0000
Subject: [PATCH 16/17] GitBook: [master] 2 pages modified
---
README.md | 4 +---
SUMMARY.md | 4 ++++
2 files changed, 5 insertions(+), 3 deletions(-)
create mode 100644 SUMMARY.md
diff --git a/README.md b/README.md
index 35ec677ab..8b694edcf 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,2 @@
- [](https://opensource.org/licenses/MIT)
+# Initial page
-# License
-This project is licensed under the terms of the MIT license
\ No newline at end of file
diff --git a/SUMMARY.md b/SUMMARY.md
new file mode 100644
index 000000000..5da1733df
--- /dev/null
+++ b/SUMMARY.md
@@ -0,0 +1,4 @@
+# Table of contents
+
+* [Initial page](README.md)
+
From 42599ffa89e4bad2862bf32b8ddc1a8ac80af07e Mon Sep 17 00:00:00 2001
From: Carlos Valente <34649812+cpvalente@users.noreply.github.com>
Date: Sun, 13 Jun 2021 10:03:02 +0200
Subject: [PATCH 17/17] Update autobuild.yml
mac release config
---
.github/workflows/autobuild.yml | 45 +++++++++++++++++++++++++++++++--
1 file changed, 43 insertions(+), 2 deletions(-)
diff --git a/.github/workflows/autobuild.yml b/.github/workflows/autobuild.yml
index 54e1a2ba5..e8953185b 100644
--- a/.github/workflows/autobuild.yml
+++ b/.github/workflows/autobuild.yml
@@ -15,8 +15,8 @@ on:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
- # This workflow contains a single job called "build"
- build:
+ # build a file for windows
+ buildwin:
# The type of runner that the job will run on
runs-on: windows-latest
env:
@@ -55,3 +55,44 @@ jobs:
files: ./server/dist/ontime-win64.exe
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+
+ # build a file for mac
+ buildmac:
+ # The type of runner that the job will run on
+ runs-on: macOS-latest
+ env:
+ CI: ''
+
+ # Steps represent a sequence of tasks that will be executed as part of the job
+ steps:
+ # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
+ - uses: actions/checkout@v2
+
+ - name: Use Node.js
+ uses: actions/setup-node@v1
+ with:
+ node-version: '14.x'
+
+ # install and build react
+ - name: Install React dependencies
+ run: yarn install
+ working-directory: ./client
+ - name: Build React App
+ run: yarn build
+ working-directory: ./client
+
+ # install and build electron
+ - name: Install Electron + nodejs dependencies
+ run: yarn install
+ working-directory: ./server
+ - name: Build Electron App
+ run: yarn dist-win
+ working-directory: ./server
+
+ # release
+ - name: Release
+ uses: softprops/action-gh-release@v1
+ with:
+ files: ./server/dist/ontime-macOS.dmg
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}