diff --git a/.github/workflows/build-demo.yml b/.github/workflows/build-demo.yml new file mode 100644 index 0000000..5a49397 --- /dev/null +++ b/.github/workflows/build-demo.yml @@ -0,0 +1,46 @@ +name: Build Demo App + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +jobs: + build-demo: + name: Build Demo APK + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Set up JDK 17 + uses: actions/setup-java@v4 + with: + java-version: '17' + distribution: 'temurin' + + - name: Set up Node.js + uses: actions/setup-node@v4 + with: + node-version: '20' + cache: 'npm' + cache-dependency-path: web-injector/package-lock.json + + - name: Build web-injector + working-directory: web-injector + run: | + npm ci + npm run build + + - name: Copy web-injector bundle to assets + run: | + mkdir -p agentic-webview/src/main/assets + cp web-injector/dist/agentic_core.min.js agentic-webview/src/main/assets/ + + - name: Make Gradle wrapper executable + run: chmod +x ./gradlew + + - name: Build demo app + run: ./gradlew :app:assembleDebug diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 0852bc3..951e000 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -57,8 +57,17 @@ jobs: ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.GPG_PASSPHRASE }} ORG_GRADLE_PROJECT_VERSION_NAME: ${{ steps.version.outputs.VERSION }} + - name: Build demo app APK (debug signed) + run: ./gradlew :app:assembleDebug + env: + ORG_GRADLE_PROJECT_VERSION_NAME: ${{ steps.version.outputs.VERSION }} + + - name: Rename APK with version + run: mv app/build/outputs/apk/debug/app-debug.apk app/build/outputs/apk/debug/agentic-webview-demo-${{ steps.version.outputs.VERSION }}.apk + - name: Create GitHub Release uses: softprops/action-gh-release@v2 with: generate_release_notes: true tag_name: ${{ github.ref_name }} + files: app/build/outputs/apk/debug/agentic-webview-demo-${{ steps.version.outputs.VERSION }}.apk