Skip to content

Commit

Permalink
Merge pull request #122 from MakinoharaShoko/dev
Browse files Browse the repository at this point in the history
4.4.3
  • Loading branch information
MakinoharaShoko authored Aug 16, 2023
2 parents e3e84e9 + 6cf26a0 commit abbfede
Show file tree
Hide file tree
Showing 63 changed files with 1,687 additions and 254 deletions.
96 changes: 96 additions & 0 deletions .github/workflows/build-terre-linux-arm64.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
name: Build and Deploy on Linux

on:
push:
branches:
- main

jobs:
build:
name: Build ARM64 Binary
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 18.x
- name: Build Stage 1
run: |
echo "Welcome to build WebGAL Origine, the editor of WebGAL platform."
# 安装依赖
yarn install --frozen-lockfile
# 清理
test -d release && rm -rf release
mkdir release
# 进入 Terre 目录
cd packages/terre2
yarn run build
- name: Build pkg ARM64
uses: pguyot/arm-runner-action@v2
with:
base_image: raspios_lite_arm64:latest
bind_mount_repository: true
commands: |
apt-get update
apt-get install -y curl sudo
# Install Node.js v18.x
curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash -
apt-get install -y nodejs
# Enable yarn
corepack prepare yarn@1.22.19 --activate
corepack enable yarn
cd packages/terre2
yarn run pkg:linux-arm64
- name: Build Stage 2
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
run: |
sudo chmod 777 -R .
cd packages/terre2/dist
cp -r WebGAL_Terre ../../../release
rm WebGAL_Terre
cd ../
mkdir Exported_Games
cp -r public assets Exported_Games ../../release
cd ../../
# 进入 Origine 目录
cd packages/origine2
# 低内存,使用下一行限制内存使用
# export NODE_OPTIONS=--max_old_space_size=512000
yarn run build
cp -rf dist/* ../../release/public/
cd ../../
# 进入 Electron 目录
cd packages/WebGAL-electron
yarn install --frozen-lockfile
yarn run build:arm64
mkdir ../../release/assets/templates/WebGAL_Electron_Template
cp -rf build/linux-arm64-unpacked/* ../../release/assets/templates/WebGAL_Electron_Template/
cd ../../
# 克隆 WebGAL Android 模板
cd release/assets/templates/
git clone https://github.com/nini22P/WebGAL-Android.git
mv WebGAL-Android WebGAL_Android_Template
# MainActivity.kt 移动到主文件夹防止误删
mv WebGAL_Android_Template/app/src/main/java/com/openwebgal/demo/MainActivity.kt WebGAL_Android_Template/app/src/main/java/MainActivity.kt
cd ../../../
cd release
# 删除冗余文件
rm -rf Exported_Games/*
rm -rf public/games/*
rm -rf public/games/.gitkeep
rm -rf assets/templates/WebGAL_Template/game/video/*
rm -rf assets/templates/WebGAL_Template/game/video/.gitkeep
rm -rf assets/templates/WebGAL_Android_Template/.github
rm -rf assets/templates/WebGAL_Android_Template/.git
rm -rf assets/templates/WebGAL_Android_Template/.gitattributes
rm -rf assets/templates/WebGAL_Android_Template/app/src/main/assets/webgal/.gitkeep
rm -rf assets/templates/WebGAL_Android_Template/app/src/main/java/com
echo "WebGAL Origine is now ready to be deployed."
- name: Upload Artifact
uses: actions/upload-artifact@v2
with:
name: WebGAL_Terre
path: release
2 changes: 1 addition & 1 deletion .github/workflows/build-terre-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- name: Install Node.js
uses: actions/setup-node@v2
with:
node-version: '16.x'
node-version: '18.x'
- name: Build
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-terre-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- name: Install Node.js
uses: actions/setup-node@v2
with:
node-version: '16.x'
node-version: '18.x'
- name: Build
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-terre-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- name: Install Node.js
uses: actions/setup-node@v2
with:
node-version: '16.x'
node-version: '18.x'
- name: Build
shell: bash
run: ./release.sh
Expand Down
98 changes: 98 additions & 0 deletions .github/workflows/pr-check-linux-arm64.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
name: Build Check Linux (ARM64)

on:
pull_request:
types:
- opened
- reopened
- synchronize

jobs:
build:
name: Build ARM64 Binary
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 18.x
- name: Build Stage 1
run: |
echo "Welcome to build WebGAL Origine, the editor of WebGAL platform."
# 安装依赖
yarn install --frozen-lockfile
# 清理
test -d release && rm -rf release
mkdir release
# 进入 Terre 目录
cd packages/terre2
yarn run build
- name: Build pkg ARM64
uses: pguyot/arm-runner-action@v2
with:
base_image: raspios_lite_arm64:latest
bind_mount_repository: true
commands: |
apt-get update
apt-get install -y curl sudo
# Install Node.js v18.x
curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash -
apt-get install -y nodejs
# Enable yarn
corepack prepare yarn@1.22.19 --activate
corepack enable yarn
cd packages/terre2
yarn run pkg:linux-arm64
- name: Build Stage 2
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
run: |
sudo chmod 777 -R .
cd packages/terre2/dist
cp -r WebGAL_Terre ../../../release
rm WebGAL_Terre
cd ../
mkdir Exported_Games
cp -r public assets Exported_Games ../../release
cd ../../
# 进入 Origine 目录
cd packages/origine2
# 低内存,使用下一行限制内存使用
# export NODE_OPTIONS=--max_old_space_size=512000
yarn run build
cp -rf dist/* ../../release/public/
cd ../../
# 进入 Electron 目录
cd packages/WebGAL-electron
yarn install --frozen-lockfile
yarn run build:arm64
mkdir ../../release/assets/templates/WebGAL_Electron_Template
cp -rf build/linux-arm64-unpacked/* ../../release/assets/templates/WebGAL_Electron_Template/
cd ../../
# 克隆 WebGAL Android 模板
cd release/assets/templates/
git clone https://github.com/nini22P/WebGAL-Android.git
mv WebGAL-Android WebGAL_Android_Template
# MainActivity.kt 移动到主文件夹防止误删
mv WebGAL_Android_Template/app/src/main/java/com/openwebgal/demo/MainActivity.kt WebGAL_Android_Template/app/src/main/java/MainActivity.kt
cd ../../../
cd release
# 删除冗余文件
rm -rf Exported_Games/*
rm -rf public/games/*
rm -rf public/games/.gitkeep
rm -rf assets/templates/WebGAL_Template/game/video/*
rm -rf assets/templates/WebGAL_Template/game/video/.gitkeep
rm -rf assets/templates/WebGAL_Android_Template/.github
rm -rf assets/templates/WebGAL_Android_Template/.git
rm -rf assets/templates/WebGAL_Android_Template/.gitattributes
rm -rf assets/templates/WebGAL_Android_Template/app/src/main/assets/webgal/.gitkeep
rm -rf assets/templates/WebGAL_Android_Template/app/src/main/java/com
echo "WebGAL Origine is now ready to be deployed."
- name: Upload Artifact
uses: actions/upload-artifact@v2
with:
name: WebGAL_Terre
path: release
2 changes: 1 addition & 1 deletion .github/workflows/pr-check-liunx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- name: Install Node.js
uses: actions/setup-node@v2
with:
node-version: '16.x'
node-version: '18.x'
- name: Build
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr-check-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- name: Install Node.js
uses: actions/setup-node@v2
with:
node-version: '16.x'
node-version: '18.x'
- name: Build
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr-check-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- name: Install Node.js
uses: actions/setup-node@v2
with:
node-version: '16.x'
node-version: '18.x'
- name: Build
shell: bash
run: ./release.sh
Expand Down
Loading

0 comments on commit abbfede

Please sign in to comment.