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: Configure DNS and Hosts run: | echo "64.22.43.251 git.hugfreevikings.wtf" | sudo tee -a /etc/hosts || echo "64.22.43.251 git.hugfreevikings.wtf" >> /etc/hosts || true echo "nameserver 1.1.1.1" | sudo tee -a /etc/resolv.conf || echo "nameserver 1.1.1.1" >> /etc/resolv.conf || true echo "nameserver 8.8.8.8" | sudo tee -a /etc/resolv.conf || echo "nameserver 8.8.8.8" >> /etc/resolv.conf || true - name: Checkout a3270 uses: actions/checkout@v4 - name: Checkout j3270 (for lib3270j) run: | git clone --depth 1 https://git.hugfreevikings.wtf/rudi/j3270.git 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