-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: revamp build system to allow auto update and CI build of App (#3)
setup build pipeline, correct frontend looking at wrong .env file. cleanup build process
- Loading branch information
Showing
7 changed files
with
93 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,12 @@ | ||
# BE Env data | ||
DATABASE_URL=sqlite://../database.db | ||
DATABASE_URL=sqlite://database.db | ||
SERVICE_STARTUP_STATE=Persistent | ||
N_OF_SERVICE_WORKERS=1 | ||
SERVICE_IP=127.0.0.1 | ||
SERVICE_PORT=25566 | ||
|
||
# FE Env data | ||
API_URL='http://127.0.0.1:25566' | ||
REPO_URL='RakuJa/BYBE-portable' | ||
# Avoid frontend opening browser on build/dev | ||
AUTO_OPEN_BROWSER=true | ||
AUTO_OPEN_BROWSER=false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,8 +5,9 @@ on: | |
branches: | ||
- release | ||
|
||
env: | ||
DATABASE_URL: "sqlite://database.db" | ||
# This workflow will trigger on each push to the `release` branch to create or update a GitHub release, build your app, and upload the artifacts to the release. | ||
|
||
jobs: | ||
publish-tauri: | ||
permissions: | ||
|
@@ -27,6 +28,13 @@ jobs: | |
runs-on: ${{ matrix.platform }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: 'true' | ||
- name: setup python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.13' | ||
check-latest: 'true' | ||
|
||
- name: setup node | ||
uses: actions/setup-node@v4 | ||
|
@@ -43,18 +51,43 @@ jobs: | |
if: matrix.platform == 'ubuntu-22.04' # This must match the platform value defined above. | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf | ||
sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf xapp | ||
- name: Remove Frontend default .env | ||
uses: JesseTG/[email protected] | ||
with: | ||
path: /BYBE-frontend/.env | ||
|
||
- name: Copy BYBE-Portable .env to Frontend (Windows) | ||
if: matrix.platform == 'windows-latest' | ||
run: | ||
Copy-Item -Path .\.env -Destination .\BYBE-frontend\.env | ||
|
||
- name: Copy BYBE-Portable .env to Frontend (Linux/Macos) | ||
if: matrix.platform != 'windows-latest' | ||
run: | ||
cp .env BYBE-frontend/.env | ||
|
||
- name: install Cargo make | ||
uses: davidB/rust-cargo-make@v1 | ||
|
||
- name: install frontend dependencies | ||
run: npm --prefix ./BYBE-frontend install | ||
working-directory: BYBE-frontend | ||
run: npm install | ||
|
||
- name: build BYBE-Backend downloading necessary data | ||
run: cargo make prebuild | ||
|
||
- uses: tauri-apps/tauri-action@v0 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }} | ||
TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }} | ||
NO_STRIP: true | ||
with: | ||
tagName: app-v__VERSION__ # the action automatically replaces \_\_VERSION\_\_ with the app version. | ||
releaseName: 'v__VERSION__' | ||
releaseBody: 'See the assets to download this version and install. \n for more info on changes look at https://github.com/RakuJa/BYBE/releases and https://github.com/theasel/BYBE-frontend/releases' | ||
releaseBody: 'For more info on changes look at https://github.com/RakuJa/BYBE/releases and https://github.com/theasel/BYBE-frontend/releases' | ||
releaseDraft: true | ||
prerelease: false | ||
args: ${{ matrix.args }} |
Submodule BYBE-backend
updated
8 files
+10 −13 | .github/workflows/push.yml | |
+1 −1 | Cargo.toml | |
+4 −1 | Dockerfile | |
+62 −0 | Makefile.toml | |
+15 −13 | README.md | |
+1 −1 | build/creature_core_db_init.rs | |
+47 −0 | setup.py | |
+4 −4 | src/services/shop_service.rs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
[tasks.clean-app] | ||
run_task = [ | ||
{name = ["clean-backend", "clean-tauri"]} | ||
] | ||
|
||
[tasks.clean-backend] | ||
cwd = "./BYBE-backend/" | ||
command = "cargo" | ||
args = ["clean"] | ||
|
||
[tasks.clean-tauri] | ||
cwd = "./BYBE-tauri/" | ||
command = "cargo" | ||
args = ["clean"] | ||
|
||
[tasks.prebuild] | ||
cwd = "./BYBE-backend/" | ||
command = "cargo" | ||
args = ["make", "bybe-release"] | ||
|
||
|
||
[tasks.build-multiplat-app] | ||
install_crate = "tauri-cli" | ||
command = "cargo" | ||
args = ["tauri", "build"] | ||
dependencies = ["clean-app", "prebuild"] | ||
|
||
[tasks.build-linux-app] | ||
install_crate = "tauri-cli" | ||
command = "cargo" | ||
args = ["tauri", "build"] | ||
dependencies = ["clean-app", "prebuild"] | ||
env = { NO_STRIP=true } | ||
|
||
|
||
[tasks.build-app] | ||
run_task = [ | ||
{ name = "build-multiplat-app", condition = { platforms = ["windows", "mac"]} }, | ||
{ name = "build-linux-app", condition = { platforms = ["linux"]} }, | ||
] |