-
Notifications
You must be signed in to change notification settings - Fork 0
139 lines (126 loc) · 4.34 KB
/
electron-all-build.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
135
136
137
138
139
name: Build WowUp Electron All - WowUp:v2.11.0 WowUp.CF:v2.11.1 - v2.11.1
on:
push:
workflow_dispatch:
workflow_call:
defaults:
run:
shell: bash
jobs:
# create-release:
# name: Create Release
# runs-on: ubuntu-latest
# steps:
# - name: Create Release
# id: create_release
# uses: actions/create-release@v1
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
# with:
# tag_name: ${{ github.ref }}
# release_name: Release ${{ github.ref }}
# draft: true
# prerelease: true
build:
name: Build
runs-on: ${{ matrix.os }}
env:
wowup_branch: 'v2.11.0'
wowupcf_branch: 'v2.11.1'
release_name: 'v2.11.1'
strategy:
matrix:
os: [ubuntu-latest, windows-latest,"macos-11"]
node-version: [20.x]
steps:
- name: Initialize git config
run: |
git config --global user.name "GitHub Actions"
git config --global user.email [email protected]
git config --global core.autocrlf false
git config --global core.eol lf
- name: Checkout WowUp-Unlimited
uses: actions/checkout@v3
with:
fetch-depth: 0
ref: 'main'
path: 'WowUp-Unlimited'
- name: Checkout WowUp-Unlimited Orphan
uses: actions/checkout@v3
with:
fetch-depth: 0
ref: '${{ env.release_name }}-Src'
path: 'WowUp-Unlimited-Src'
- name: Checkout WowUp
uses: actions/checkout@v3
with:
repository: 'WowUp/WowUp'
ref: ${{ env.wowup_branch }}
path: 'WowUp'
fetch-depth: 0
- name: Checkout WowUp.CF
uses: actions/checkout@v3
with:
repository: 'WowUp/WowUp.CF'
ref: ${{ env.wowupcf_branch }}
path: 'WowUp.CF'
fetch-depth: 0
- name: Install GNU patch
if: matrix.os == 'macos-11'
run: brew install gpatch
- name: WowUp Unlimited Merge
run: WowUp-Unlimited/merge.sh
- name: Commit WowUp Unlimited Patched Source
if: matrix.os == 'ubuntu-latest'
run: |
cd ./WowUp-Unlimited-Src
cp -af ../WowUp WowUp
cp -af ../WowUp-Unlimited WowUp-Unlimited
cp -af .github/workflows/electron-all-build.yml WowUp/.github/workflows/electron-all-build.yml
rm -rf WowUp/.git
rm -rf WowUp-Unlimited/.git
git add WowUp WowUp-Unlimited
git commit -a -m "WowUp-Unlimited ${{ env.release_name }}"
git tag -d "${{ env.release_name }}" || true
git tag "${{ env.release_name }}"
git push --force origin "${{ env.release_name }}-Src"
git push --tags --force origin "${{ env.release_name }}"
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- name: Inject Token
env:
CURSEFORGE_API_KEY: ${{ secrets.CURSEFORGE_API_KEY }}
run: |
cd ./WowUp/wowup-electron
node ./inject-token.js
- name: Install Angular CLI
run: npm install -g @angular/cli
- name: dmg-license
if: matrix.os == 'macos-11'
run: |
cd ./WowUp/wowup-electron
npm i dmg-license
- name: Build Linux App
if: matrix.os == 'ubuntu-latest'
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
run: |
cd ./WowUp/wowup-electron
npm i
npm run electron:publish:vanilla
- name: Build Mac App
if: matrix.os == 'macos-11'
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
CSC_IDENTITY_AUTO_DISCOVERY: 'false'
run: |
cd ./WowUp/wowup-electron
npm i
npm run electron:publish:vanilla
- name: Build Windows App
if: matrix.os == 'windows-latest'
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
run: cd ./WowUp/wowup-electron && npm i && npm run electron:publish