This repository was archived by the owner on Oct 20, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 7 files changed +45
-42
lines changed
Expand file tree Collapse file tree 7 files changed +45
-42
lines changed Original file line number Diff line number Diff line change @@ -21,33 +21,14 @@ jobs:
2121 - uses : actions/checkout@v3
2222 with :
2323 fetch-depth : 0
24- - name : Use Node.js ${{ matrix.node-version }}
25- uses : actions/setup-node@v3
26- with :
27- node-version : 16.19.0
28- cache : ' yarn'
29- - run : |
30- npm install -g pkg-fetch
31- pkg-fetch --platform linux --node-range node16
32- pkg-fetch --platform mac --node-range node16
33- pkg-fetch --platform win --node-range node16
3424 - run : |
35- yarn install --immutable --inline-builds
36- yarn run release:all
37- chmod +x release/mac/RedEye
38- chmod +x release/linux/RedEye
39- - name : Archive mac production artifacts
40- uses : actions/upload-artifact@v3
41- with :
42- name : mac
43- path : release/mac
44- - name : Archive linux production artifacts
25+ docker-compose -f docker-compose.yml up -d redeye-artifacts
26+ docker create -ti --name redeye-artifacts redeye-builder bash
27+ docker cp redeye-artifacts:/app/outputs ./artifacts
28+ docker rm -f redeye-artifacts
29+ - name : Archive artifacts
4530 uses : actions/upload-artifact@v3
4631 with :
47- name : linux
48- path : release/linux
49- - name : Archive windows production artifacts
50- uses : actions/upload-artifact@v3
51- with :
52- name : windows
53- path : release/windows
32+ name : RedEye
33+ path : artifacts
34+
Original file line number Diff line number Diff line change @@ -233,34 +233,36 @@ tasks:
233233 - ~:release-linux
234234 - ~:release-windows
235235 - ~:release-mac
236- platform : node
236+ platform : system
237237 options :
238238 mergeOutputs : ' replace'
239239 runInCI : false
240240 release-mac :
241- command : ' pkg . /package.json -t node16-mac -o @out(0)'
241+ command : ' yarn pkg $projectRoot /package.json -t node16-mac -o @out(0)'
242242 deps :
243243 - ~:fetch-pkg-mac
244244 - ~:build
245- platform : node
245+ platform : system
246246 outputs :
247247 - /release/mac/RedEye
248248 options :
249249 mergeOutputs : ' replace'
250250 runInCI : false
251+ runFromWorkspaceRoot : true
251252 release-linux :
252- command : ' pkg . /package.json -t node16-linux -o @out(0)'
253+ command : ' yarn pkg $projectRoot /package.json -t node16-linux -o @out(0)'
253254 deps :
254255 - ~:fetch-pkg-linux
255256 - ~:build
256- platform : node
257+ platform : system
257258 outputs :
258259 - /release/linux/RedEye
259260 options :
260261 mergeOutputs : ' replace'
261262 runInCI : false
263+ runFromWorkspaceRoot : true
262264 release-windows :
263- command : ' pkg . /package.json -t node16-win -o @out(0)'
265+ command : ' yarn pkg $projectRoot /package.json -t node16-win -o @out(0)'
264266 deps :
265267 - ~:fetch-pkg-windows
266268 - ~:build
@@ -269,21 +271,31 @@ tasks:
269271 options :
270272 mergeOutputs : ' replace'
271273 runInCI : false
274+ runFromWorkspaceRoot : true
272275 platform : node
273276
274277 # # Fetch pkg commands
275278 fetch-pkg-mac :
276- command : ' pkg-fetch --platform mac --node-range node16'
279+ command : ' yarn pkg-fetch --platform mac --node-range node16'
280+ platform : system
277281 options :
278282 runInCI : false
283+ retryCount : 2
284+ runFromWorkspaceRoot : true
279285 fetch-pkg-linux :
280- command : ' pkg-fetch --platform linux --node-range node16'
286+ command : ' yarn pkg-fetch --platform linux --node-range node16'
287+ platform : system
281288 options :
282289 runInCI : false
290+ retryCount : 2
291+ runFromWorkspaceRoot : true
283292 fetch-pkg-windows :
284- command : ' pkg-fetch --platform win --node-range node16'
293+ command : ' yarn pkg-fetch --platform win --node-range node16'
294+ platform : system
285295 options :
286296 runInCI : false
297+ retryCount : 2
298+ runFromWorkspaceRoot : true
287299
288300 # # Clean
289301 clean-dist :
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ $schema: 'https://moonrepo.dev/schemas/toolchain.json'
1010node :
1111 # The version to use. Must be a semantic version that includes major, minor, and patch.
1212 # We suggest using the latest active LTS version: https://nodejs.org/en/about/releases
13- version : ' 16.19.0 '
13+ version : ' 16.19.1 '
1414
1515 # The package manager to use when managing dependencies.
1616 # Accepts "npm" (default), "pnpm", or "yarn".
Original file line number Diff line number Diff line change @@ -3,11 +3,19 @@ FROM node:16-bullseye as redeye-builder
33WORKDIR /app
44COPY ./ ./
55ENV CYPRESS_INSTALL_BINARY=0
6+ RUN npm install -g pkg
67RUN yarn install --immutable --inline-builds
7- RUN npx pkg-fetch --platform mac --node-range node16
8- RUN npx pkg-fetch --platform linux --node-range node16
9- RUN npx pkg-fetch --platform win --node-range node16
10- RUN yarn run release:all
8+ RUN curl -fsSL https://moonrepo.dev/install/moon.sh | bash
9+ RUN moon run server:build client:build cs-parser:build
10+ RUN pkg applications/server/package.json -t node16-mac-x64 -o release/mac/RedEye
11+ RUN pkg applications/server/package.json -t node16-linux-x64 -o release/linux/RedEye
12+ RUN pkg applications/server/package.json -t node16-windows-x64 -o release/windows/RedEye
13+ RUN pkg packages/cs-parser/package.json -t node16-mac-x64 -o release/mac/parsers/cs-parser
14+ RUN pkg packages/cs-parser/package.json -t node16-linux-x64 -o release/linux/parsers/cs-parser
15+ RUN pkg packages/cs-parser/package.json -t node16-windows-x64 -o release/windows/parsers/cs-parser
16+ RUN tar -zcvf release.tar.gz ./release/
17+ RUN mkdir outputs
18+ RUN cp release.tar.gz outputs/release.tar.gz
1119
1220FROM node:16-bullseye as redeye-linux-builder
1321
Original file line number Diff line number Diff line change 88 ],
99 "assets" : [
1010 " ../client/dist/**/*" ,
11+ " ../../node_modules/better-sqlite3/**/*.*" ,
1112 " ../../../node_modules/better-sqlite3/**/*.*"
1213 ],
1314 "compress" : " GZip"
Original file line number Diff line number Diff line change 55 "bin" : " ./dist/index.js" ,
66 "pkg" : {
77 "assets" : [
8+ " ../../node_modules/better-sqlite3/**/*.*" ,
89 " ../../../node_modules/better-sqlite3/**/*.*"
910 ],
1011 "compress" : " GZip"
Original file line number Diff line number Diff line change 11docker-compose -f ../docker-compose.yml up -d redeye-artifacts
22docker create -ti --name redeye-artifacts redeye-builder bash
33docker cp redeye-artifacts:/app/release ./artifacts
4- docker rm -f artifacts
4+ docker rm -f redeye- artifacts
You can’t perform that action at this time.
0 commit comments