Skip to content
This repository has been archived by the owner on Oct 29, 2024. It is now read-only.

Update build.yml

Update build.yml #14

Workflow file for this run

name: Gradle Build
on:
push:
branches:
- main
- dev
- ci
pull_request:
branches:
- main
- dev
- ci
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up JDK
uses: actions/setup-java@v2
with:
java-version: '17'
distribution: 'adopt'
- name: Grant execute permission for gradlew
run: chmod +x ./gradlew
- name: Build with Gradle
run: ./gradlew assembleRelease
- name: List APK directory contents
run: ls -la app/build/outputs/apk/release/
- name: Create artifacts directory
run: mkdir -p ${{ github.workspace }}/artifacts
- name: Debugging step
run: |
echo "Current directory: $(pwd)"
echo "Listing root directory:"
ls -la /
echo "Listing home directory:"
ls -la /home/runner/
echo "Listing workspace directory:"
ls -la ${{ github.workspace }}
echo "Listing artifacts directory:"
ls -la ${{ github.workspace }}/artifacts
- name: Copy APK to artifacts directory
run: cp app/build/outputs/apk/release/app-release-unsigned.apk ${{ github.workspace }}/artifacts/
- name: Archive build artifacts
uses: actions/upload-artifact@v3
with:
name: app-release-unsigned.apk
path: ${{ github.workspace }}/artifacts/