From 299bef94432d940fab9d86f9e15e4386280dcd79 Mon Sep 17 00:00:00 2001 From: Pratyush Singh <90026952+PratyushSingh07@users.noreply.github.com> Date: Fri, 5 Jan 2024 01:39:50 +0530 Subject: [PATCH 1/3] ci: Create master_branch.yml --- .github/workflows/master_branch.yml | 47 +++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 .github/workflows/master_branch.yml diff --git a/.github/workflows/master_branch.yml b/.github/workflows/master_branch.yml new file mode 100644 index 0000000..f19f953 --- /dev/null +++ b/.github/workflows/master_branch.yml @@ -0,0 +1,47 @@ +name: Master Branch Workflow + +on: + push: + branches: [ "master" ] + pull_request: + branches: [ "master" ] + +permissions: + contents: read + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + - name: Set up JDK 11 + uses: actions/setup-java@v3 + with: + java-version: '11' + distribution: 'temurin' + - name: Build with Gradle + uses: gradle/gradle-build-action@bd5760595778326ba7f1441bcf7e88b49de61a25 # v2.6.0 + with: + arguments: build + + lintCheck: + name: Static Analysis + runs-on: ubuntu-latest + steps: + - name: Checking out repository + uses: actions/checkout@v4 + + - name: Static Analysis + run: ./gradlew lint + + pmd: + name: PMD + runs-on: ubuntu-latest + steps: + - name: Checking out repository + uses: actions/checkout@v4 + + - name: PMD Check + run: ./gradlew pmd From 8307cc912c130332ce524242bd6bf5784ce10c1b Mon Sep 17 00:00:00 2001 From: Pratyush Singh <90026952+PratyushSingh07@users.noreply.github.com> Date: Fri, 5 Jan 2024 01:43:09 +0530 Subject: [PATCH 2/3] ci: created master_branch.yml --- .github/workflows/master_branch.yml | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/.github/workflows/master_branch.yml b/.github/workflows/master_branch.yml index f19f953..7d7244e 100644 --- a/.github/workflows/master_branch.yml +++ b/.github/workflows/master_branch.yml @@ -14,17 +14,24 @@ jobs: runs-on: ubuntu-latest + name: Build APK steps: - - uses: actions/checkout@v3 - - name: Set up JDK 11 - uses: actions/setup-java@v3 - with: - java-version: '11' - distribution: 'temurin' - - name: Build with Gradle - uses: gradle/gradle-build-action@bd5760595778326ba7f1441bcf7e88b49de61a25 # v2.6.0 - with: - arguments: build + - name: Checking out repository + uses: actions/checkout@v4 + + # Set up JDK + - name: Set Up JDK 1.8 + uses: actions/setup-java@v1 + with: + java-version: 11 + + - name: Change gradlew Permission + run: chmod +x gradlew + + # Build App + - name: Build with Gradle + run: ./gradlew assemble + lintCheck: name: Static Analysis From 08cef9e19948b5f22cb3b017f8e2219f821898cf Mon Sep 17 00:00:00 2001 From: Pratyush Singh <90026952+PratyushSingh07@users.noreply.github.com> Date: Fri, 5 Jan 2024 01:46:49 +0530 Subject: [PATCH 3/3] ci: workflow for master branch --- .github/workflows/master_branch.yml | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/.github/workflows/master_branch.yml b/.github/workflows/master_branch.yml index 7d7244e..ae61f77 100644 --- a/.github/workflows/master_branch.yml +++ b/.github/workflows/master_branch.yml @@ -1,30 +1,30 @@ -name: Master Branch Workflow +name: Workflow for master branche on: - push: - branches: [ "master" ] pull_request: - branches: [ "master" ] - -permissions: - contents: read + push: + branches: + - 'master' jobs: build: - - runs-on: ubuntu-latest - name: Build APK + runs-on: ubuntu-latest steps: - name: Checking out repository uses: actions/checkout@v4 - + # Set up JDK - - name: Set Up JDK 1.8 + - name: Set Up JDK 11 uses: actions/setup-java@v1 with: java-version: 11 + # Install NDK + - name: Install NDK + run: echo "y" | sudo ${ANDROID_HOME}/tools/bin/sdkmanager --install "ndk;20.0.5594570" --sdk_root=${ANDROID_SDK_ROOT} + + # Update Gradle Permission - name: Change gradlew Permission run: chmod +x gradlew @@ -32,14 +32,13 @@ jobs: - name: Build with Gradle run: ./gradlew assemble - lintCheck: name: Static Analysis runs-on: ubuntu-latest steps: - name: Checking out repository uses: actions/checkout@v4 - + - name: Static Analysis run: ./gradlew lint