Merge pull request #360 from apeun-gidaechi/feature/355-profile-torch… #514
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Android CI | |
on: | |
push: | |
branches: [ "develop" , "main"] | |
pull_request: | |
branches: [ "develop" , "main"] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: set up JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
cache: gradle | |
- name: Grant execute permission for gradlew | |
run: chmod +x gradlew | |
- name: Set up local.properties | |
run: | | |
echo "BASE_URL=${SERVER_URL}" > $GITHUB_WORKSPACE/local.properties | |
echo "WS_URL=${WS_URL}" >> $GITHUB_WORKSPACE/local.properties | |
echo "AI_URL=${AI_URL}" >> $GITHUB_WORKSPACE/local.properties | |
echo "BASE_URL=${SERVER_URL}" | |
echo "WS_URL=${WS_URL}" | |
echo "AI_URL=${AI_URL}" | |
env: | |
SERVER_URL: ${{ secrets.SERVER_URL }} | |
WS_URL: ${{ secrets.WS_URL }} | |
AI_URL: ${{ secrets.AI_URL }} | |
- name: Set up Google Service Json | |
id: create-json | |
uses: jsdaniell/[email protected] | |
with: | |
name: "google-services.json" | |
json: ${{ secrets.GOOGLE_SERVICES }} | |
dir: 'app/' | |
- name: Build with Gradle | |
run: ./gradlew build --parallel | |
- name: Run spotless | |
run: ./gradlew spotlessCheck | |
- name: Assemble | |
run: ./gradlew assemble --parallel | |
- name: Upload Debug APK | |
uses: actions/upload-artifact@v3 | |
with: | |
name: debug | |
path: ./app/build/outputs/apk/debug/app-debug.apk | |
- name: Upload Release APK | |
uses: actions/upload-artifact@v3 | |
with: | |
name: release | |
path: ./app/build/outputs/apk/release/app-release-unsigned.apk | |