From 27bf1c835c5fa7be0e1552be0649c9a507e60d0e Mon Sep 17 00:00:00 2001 From: Rudi Date: Thu, 20 Aug 2026 18:39:38 -0400 Subject: [PATCH] Add workflows --- .gitea/workflows/build.yml | 47 ++++++++++++++++++++++++++++++++++++++ README.md | 10 ++++++++ 2 files changed, 57 insertions(+) create mode 100644 .gitea/workflows/build.yml diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml new file mode 100644 index 0000000..33c4c69 --- /dev/null +++ b/.gitea/workflows/build.yml @@ -0,0 +1,47 @@ +name: Build a3270 APK + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + workflow_dispatch: + +jobs: + build: + name: Build Android APK + runs-on: ubuntu-latest + + steps: + - name: Checkout a3270 + uses: actions/checkout@v4 + + - name: Checkout j3270 (for lib3270j) + uses: actions/checkout@v4 + with: + repository: rudi/j3270 + path: j3270 + + - name: Set up JDK 21 + uses: actions/setup-java@v4 + with: + distribution: 'temurin' + java-version: '21' + + - name: Set up Android SDK + uses: android-actions/setup-android@v3 + + - name: Grant execute permission for gradlew + run: chmod +x gradlew + + - name: Build Debug APK + run: ./gradlew assembleDebug --no-daemon + env: + J3270_DIR: ${{ github.workspace }}/j3270 + + - name: Upload APK Artifact + uses: actions/upload-artifact@v4 + with: + name: a3270-debug + path: build/outputs/apk/debug/a3270-debug.apk + if-no-files-found: error diff --git a/README.md b/README.md index 2eca550..b88efd6 100644 --- a/README.md +++ b/README.md @@ -9,6 +9,16 @@ An Android TN3270 terminal emulator based on `lib3270j` / `j3270`, built with Je `a3270` relies on the shared 3270 protocol library (`lib3270j`) provided by the `j3270` repository. +## CI/CD & Automated Builds + +Automated CI/CD is configured using Gitea Actions (`.gitea/workflows/build.yml`). On every push to `main` or pull request, the workflow automatically: +1. Clones `a3270` and `j3270` (`lib3270j`). +2. Configures JDK 21 and the Android SDK. +3. Builds the debug APK (`a3270-debug.apk`). +4. Uploads the resulting APK as a downloadable workflow artifact (`a3270-debug`). + +You can download pre-built APKs directly from the **Actions** tab of the repository on Gitea. + ## Prerequisites - **Java Development Kit (JDK)**: JDK 17 or JDK 21