-
Notifications
You must be signed in to change notification settings - Fork 7
88 lines (88 loc) · 3.67 KB
/
windows-build.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
name: Windows Build
on:
push:
paths-ignore:
- '.github/test-build.yaml'
branches: [ main ]
workflow_dispatch:
defaults:
run:
working-directory: ./
env:
USE_HARD_LINKS: false
MIGRATIONS_DIR: .migrate
ASSET_PREFIX: '.'
npm_config_yes: true
NEXT_PUBLIC_ENGINES: 1
MIGRATIONS_ID_TYPE_SQL: bigint
MIGRATIONS_ID_TYPE_GQL: bigint
MIGRATIONS_HASURA_PATH: localhost:8080
MIGRATIONS_HASURA_SSL: 0
MIGRATIONS_HASURA_SECRET: myadminsecretkey
NEXT_PUBLIC_DEEPLINKS_SERVER: http://localhost:3007
NEXT_PUBLIC_GQL_PATH: localhost:3006/gql
NEXT_PUBLIC_GQL_SSL: 0
DEEPLINKS_HASURA_PATH: localhost:8080
DEEPLINKS_HASURA_SSL: 0
MIGRATIONS_DEEPLINKS_APP_URL: http://host.docker.internal:3007
MIGRATIONS_DEEPLINKS_URL: http://host.docker.internal:3006
DOCKER: 1
jobs:
build:
runs-on: windows-2019
steps:
- uses: actions/checkout@v2
- name: Reconfigure git to use HTTP authentication
run: >
git config --global url."https://github.com/".insteadOf
ssh://[email protected]/
- uses: actions/setup-node@v1
with:
node-version: 17.9.1
- name: Configure Node caching
uses: actions/cache@v2
env:
cache-name: cache-node-modules-windows
with:
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: install node tools
run: npm install --global --production [email protected]
- name: install node-gyp
run: npm install --global node-gyp@latest
- name: Set node config to use python2.7
run: npm config set python python2.7
- name: Install latest npm
run: npm i -g npm@8
- name: Install dc dependencies
run: npm ci --force
- name: Install electron dependencies
run: cd electron && npm ci
- name: engine file
run: git clone https://github.com/deep-foundation/deeplinks.git && cp deeplinks/imports/engine.ts electron/src/engine.ts && npx rimraf -I deeplinks
# - name: pull hasura
# run: cd node_modules/@deep-foundation && rm -r hasura && git clone https://github.com/deep-foundation/hasura.git && cd hasura && npm ci && npm run package:build && rm -r node_modules && rm -r package-lock.json && cd ../../.. && rm -r electron/node_modules/@deep-foundation/hasura && cp -r node_modules/@deep-foundation/hasura electron/node_modules/@deep-foundation/hasura
# - name: pull store
# run: cd node_modules/@deep-foundation && rm -r store && git clone https://github.com/deep-foundation/store.git && cd store && npm ci && npm run package:build && rm -r node_modules && rm -r package-lock.json && cd ../../.. && rm -r electron/node_modules/@deep-foundation/store && cp -r node_modules/@deep-foundation/store electron/node_modules/@deep-foundation/store
- name: build next
run: npm run build && npm run export && npx rimraf electron/app && npx cap copy electron
- name: Build distribution
run: cd electron && npm run electron:pack
- name: Create zip file
run: |
cd electron/dist
tar.exe -a -c -f deep-case.zip "deep-case-setup.exe"
- name: And a README (to work around GitHub double-zips)
run: |
echo "More information: https://deep.foundation" > electron/dist/README.txt
- name: Upload artifact
uses: actions/upload-artifact@v2
with:
name: deep-case-Windows
path: |
electron/dist/deep-case.zip
electron/dist/README.txt