-
Notifications
You must be signed in to change notification settings - Fork 13
134 lines (113 loc) · 4.26 KB
/
build-dev.yml
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
name: Publish
on:
push:
branches:
- dev
jobs:
publish:
# To enable auto publishing to github, update your electron publisher
# config in package.json > "build" and remove the conditional below
#if: ${{ github.repository_owner === 'electron-react-boilerplate' }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
steps:
- name: Checkout git repo
uses: actions/checkout@v3
- name: Git Submodule Update
run: git submodule update --init --recursive
- name: Use cached node_modules
id: cache-node_modules
uses: actions/cache@v3
with:
path: node_modules
key: ${{ runner.os }}-${{ hashFiles('package-lock.json') }}
- name: Install Node and NPM
uses: actions/setup-node@v3
with:
node-version-file: .nvmrc
cache: npm
- name: Install dependencies
if: steps.cache-node_modules.outputs.cache-hit != 'true'
run: npm ci
- name: Set Early Build
run: |
sed -i "s|main|dev|g" "./src/data/branch.json"
#sed -i "s|EmuDeck|EmuDeck-dev|g" "./release/app/package.json"
#sed -i 's|"productName": "EmuDeck"|"productName": "EmuDeck-dev"|g' "./package.json"
- name: Publish releases
env:
# These values are used for auto updates signing
#APPLE_ID: ${{ secrets.APPLE_ID }}
#APPLE_ID_PASS: ${{ secrets.APPLE_ID_PASS }}
#CSC_LINK: ${{ secrets.CSC_LINK }}
#CSC_KEY_PASSWORD: ${{ secrets.CSC_KEY_PASSWORD }}
# This is used for uploading release assets to github
#npm run build:${GITHUB_REF##*/} -> Branch name
#npm exec electron-builder -- --publish always --linux --win
GH_TOKEN: ${{ secrets.github_token }}
run: |
npm run postinstall
npm run build
npm exec electron-builder -- --publish always --linux
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: EmuDeck-dev-AppImage
path: '**/*.AppImage'
publish-windows-mac:
# To enable auto publishing to github, update your electron publisher
# config in package.json > "build" and remove the conditional below
#if: ${{ github.repository_owner === 'electron-react-boilerplate' }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macOS-latest]
steps:
- name: Checkout git repo
uses: actions/checkout@v3
- name: Git Submodule Update
run: git submodule update --init --recursive
- name: Use cached node_modules
id: cache-node_modules
uses: actions/cache@v3
with:
path: node_modules
key: ${{ runner.os }}-${{ hashFiles('package-lock.json') }}
- name: Install Node and NPM
uses: actions/setup-node@v3
with:
node-version-file: .nvmrc
cache: npm
- name: Install dependencies
if: steps.cache-node_modules.outputs.cache-hit != 'true'
run: npm ci
- name: Set Early Build
run: |
sed -i'.original' -e "s|main|dev|g" "./src/data/branch.json"
#sed -i'.original' -e "s|EmuDeck|EmuDeck-dev|g" "./release/app/package.json"
#sed -i'.original' -e 's|"productName": "EmuDeck"|"productName": "EmuDeck-dev"|g' "./package.json"
- name: Publish releases
env:
# These values are used for auto updates signing
#APPLE_ID: ${{ secrets.APPLE_ID }}
#APPLE_ID_PASS: ${{ secrets.APPLE_ID_PASS }}
#CSC_LINK: ${{ secrets.CSC_LINK }}
#CSC_KEY_PASSWORD: ${{ secrets.CSC_KEY_PASSWORD }}
# This is used for uploading release assets to github
#npm run build:${GITHUB_REF##*/} -> Branch name
#npm exec electron-builder -- --publish always --linux --win
GH_TOKEN: ${{ secrets.github_token }}
run: |
npm run postinstall
npm run build
npm exec electron-builder -- --publish always --win
npm exec electron-builder -- --publish always --mac
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: EmuDeck-dev-win-mac
path: |
**/*.exe
**/*.dmg