ci: add Gitea Actions workflows for .exe and APK builds
- build-exe.yml: Python server → PyInstaller → PaperDash.exe (windows-latest) - build-apk.yml: Android project → Gradle → app-debug.apk (ubuntu-latest) - Both trigger on push/PR to main when relevant paths change
This commit is contained in:
@@ -0,0 +1,52 @@
|
||||
name: Build Server .exe
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
paths:
|
||||
- "server/**"
|
||||
- ".gitea/workflows/build-exe.yml"
|
||||
pull_request:
|
||||
branches: [main]
|
||||
paths:
|
||||
- "server/**"
|
||||
- ".gitea/workflows/build-exe.yml"
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: windows-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: "3.12"
|
||||
cache: "pip"
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
cd server
|
||||
python -m pip install --upgrade pip
|
||||
pip install -r requirements.txt
|
||||
|
||||
- name: Run tests
|
||||
run: |
|
||||
cd server
|
||||
pip install pytest pytest-asyncio
|
||||
pytest tests/ -v
|
||||
|
||||
- name: Build .exe
|
||||
run: |
|
||||
cd server
|
||||
python build_exe.py
|
||||
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: PaperDash.exe
|
||||
path: server/dist/PaperDash.exe
|
||||
if-no-files-found: error
|
||||
Reference in New Issue
Block a user