Add Termux build workflow

This commit is contained in:
JGZSunShineMod1.0.3
2026-04-24 23:55:11 +08:00
parent 61987d94f8
commit 7108402b13
+57
View File
@@ -0,0 +1,57 @@
name: Build Oraset for Termux
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
release:
types: [ created ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.10
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pyinstaller
- name: Build binary
run: |
pyinstaller --onefile oraset.py
- name: Create DEB package
run: |
mkdir -p oraset_1.0.0_all/DEBIAN
echo "Package: oraset
Version: 1.0.0
Section: utils
Priority: optional
Architecture: all
Depends: python3
Maintainer: Oraset Team
Description: Oraset programming language interpreter for Termux" > oraset_1.0.0_all/DEBIAN/control
mkdir -p oraset_1.0.0_all/usr/bin
cp dist/oraset oraset_1.0.0_all/usr/bin/oraset
chmod +x oraset_1.0.0_all/usr/bin/oraset
dpkg-deb --build oraset_1.0.0_all
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: oraset-termux
path: |
dist/oraset
oraset_1.0.0_all.deb
- name: Upload to Release
if: github.event_name == 'release'
uses: softprops/action-gh-release@v2
with:
files: |
dist/oraset
oraset_1.0.0_all.deb
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}