Skip to content

Tweak

Tweak #2

Workflow file for this run

name: Android Build CI/CD
on:
push:
jobs:
build:
name: build
runs-on: ubuntu-latest
defaults:
run:
working-directory: native_gg
timeout-minutes: 1
steps:
- uses: actions/[email protected]
- uses: pnpm/[email protected]
with:
version: 8.12.1
- name: install dependencies
run: pnpm install --frozen-lockfile
# Automatically overrides the version code and version name through the github actions
- name: Bump version
uses: chkfung/[email protected]
with:
gradlePath: native_gg/android/app/build.gradle
versionCode: ${{github.run_number}}
- name: Install Dependencies
run: pnpm install --frozen-lockfile
- name: Run Unit Test
run: ./gradlew test
# cache Gradle dependencies and wrapper to reduce build time
- name: Cache Gradle Wrapper
uses: actions/[email protected]
with:
path: ~/.gradle/wrapper
key: ${{ runner.os }}-gradle-wrapper-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }}
- name: Cache Gradle Dependencies
uses: actions/cache@v3
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-caches-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-caches-
- name: Make Gradlew Executable
run: cd android && chmod +x ./gradlew