-
-
Notifications
You must be signed in to change notification settings - Fork 58
168 lines (166 loc) · 4.96 KB
/
build-terre.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
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
name: Build WebGAL Terre
on:
workflow_dispatch:
push:
branches:
- main
pull_request:
types:
- opened
- reopened
- synchronize
jobs:
build-linux:
name: Build Linux Binary
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version-file: package.json
cache: 'yarn'
- name: Build
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
run: sh release-linux.sh
- name: Compress
run: 7z a -tzip release/WebGAL_Terre_Linux.zip release/*
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: WebGAL_Terre_Linux
path: release/WebGAL_Terre_Linux.zip
build-arm64:
name: Build Linux ARM64 Binary
runs-on: ubuntu-24.04-arm
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version-file: package.json
cache: 'yarn'
- name: Build
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
run: sh release-linux-arm64.sh
- name: Compress
run: 7z a -tzip release/WebGAL_Terre_Linux_Arm64.zip release/*
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: WebGAL_Terre_Linux_Arm64
path: release/WebGAL_Terre_Linux_Arm64.zip
build-mac:
name: Build MacOS Binary
runs-on: macos-14
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version-file: package.json
cache: 'yarn'
- name: Build
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
run: sh release-mac.sh
- name: Compress
run: 7z a -tzip release/WebGAL_Terre_Mac.zip release/*
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: WebGAL_Terre_Mac
path: release/WebGAL_Terre_Mac.zip
build-windows:
name: Build Windows Binary
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version-file: package.json
cache: 'yarn'
- name: Build
shell: bash
run: ./release.sh
- name: Compress
run: 7z a -tzip release/WebGAL_Terre_Windows.zip release/*
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: WebGAL_Terre_Windows
path: release/WebGAL_Terre_Windows.zip
build-windows-nsis:
name: Build Windows Setup
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version-file: package.json
cache: 'yarn'
- name: Build
shell: bash
run: ./release.sh
- name: Build Setup
shell: bash
run: mkdir bundle && yarn nsis-bundle
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: WebGAL_Terre_Windows_Setup
path: bundle/WebGal_Terre_Setup.exe
build-android:
name: Build Android Binary
runs-on: ubuntu-latest
env:
KEYSTORE: ${{ secrets.KEYSTORE }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version-file: package.json
cache: 'yarn'
- name: Set up Java
uses: actions/setup-java@v4
with:
distribution: zulu
java-version: 21
- name: Decode and save keystore
if: ${{ env.KEYSTORE != '' }}
run: |
echo "${{ secrets.KEYSTORE }}" | base64 --decode > packages/terre-android/app/keystore.jks
- name: Save key.properties
if: ${{ env.KEYSTORE != '' }}
run: |
echo "storePassword=${{ secrets.STORE_PASSWORD }}" >> packages/terre-android/key.properties
echo "keyPassword=${{ secrets.KEY_PASSWORD }}" >> packages/terre-android/key.properties
echo "keyAlias=${{ secrets.KEY_ALIAS }}" >> packages/terre-android/key.properties
echo "storeFile=keystore.jks" >> packages/terre-android/key.properties
- name: Build
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
run: sh release-android.sh
- name: Upload Release Artifact
if: ${{ env.KEYSTORE != '' }}
uses: actions/upload-artifact@v4
with:
name: WebGAL_Terre_Android
path: release/WebGAL_Terre_Android.apk
- name: Upload Debug Artifact
if: ${{ env.KEYSTORE == '' }}
uses: actions/upload-artifact@v4
with:
name: WebGAL_Terre_Android_debug
path: release/WebGAL_Terre_Android_debug.apk