mirror of
https://github.com/johndoe6345789/CaproverForge.git
synced 2026-04-24 13:44:56 +00:00
44 lines
978 B
YAML
44 lines
978 B
YAML
name: Build and Publish APK
|
|
|
|
on:
|
|
push:
|
|
branches: [ main, master ]
|
|
pull_request:
|
|
branches: [ main, master ]
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up JDK 17
|
|
uses: actions/setup-java@v4
|
|
with:
|
|
java-version: '17'
|
|
distribution: 'temurin'
|
|
|
|
- name: Grant execute permission for gradlew
|
|
run: chmod +x gradlew
|
|
|
|
- name: Build Debug APK
|
|
run: ./gradlew assembleDebug
|
|
|
|
- name: Build Release APK
|
|
run: ./gradlew assembleRelease
|
|
|
|
- name: Upload Debug APK
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: app-debug
|
|
path: app/build/outputs/apk/debug/app-debug.apk
|
|
|
|
- name: Upload Release APK
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: app-release
|
|
path: app/build/outputs/apk/release/app-release-unsigned.apk
|