This commit is contained in:
60
.gitea/workflows/gradle_build.yaml
Normal file
60
.gitea/workflows/gradle_build.yaml
Normal file
@@ -0,0 +1,60 @@
|
||||
name: Gradle Build
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ main, master, dev ]
|
||||
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@v3
|
||||
with:
|
||||
distribution: 'temurin'
|
||||
java-version: '17'
|
||||
cache: 'gradle'
|
||||
|
||||
- name: Grant execute permission for gradlew
|
||||
run: |
|
||||
find . -name gradlew -type f -exec chmod +x {} \;
|
||||
|
||||
- name: Debug Info
|
||||
run: |
|
||||
echo "Current workspace directory: $GITHUB_WORKSPACE"
|
||||
echo "Current directory: $(pwd)"
|
||||
echo "Project structure:"
|
||||
find . -type f -name "*.kt" | sort
|
||||
find . -type f -name "build.gradle*"
|
||||
if [ -f ./gradlew ]; then
|
||||
./gradlew --version
|
||||
else
|
||||
echo "No wrapper found, will use system gradle"
|
||||
gradle --version
|
||||
fi
|
||||
|
||||
- name: Build CameraApp (CameraApp)
|
||||
working-directory: .
|
||||
run: |
|
||||
echo "Building CameraApp"
|
||||
echo "Current directory: $(pwd)"
|
||||
# Run Gradle build
|
||||
./gradlew build
|
||||
|
||||
- name: Upload CameraApp artifact
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: CameraApp
|
||||
path: |
|
||||
./build/libs/*.jar
|
||||
./app/build/libs/*.jar
|
||||
./build/distributions/*.zip
|
||||
./app/build/distributions/*.zip
|
||||
if-no-files-found: warn
|
||||
Reference in New Issue
Block a user