Skip to content

Commit

Permalink
feat(build): setup builds from develop
Browse files Browse the repository at this point in the history
  • Loading branch information
axiel7 committed Aug 11, 2024
1 parent 87e532d commit 1b19b82
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 7 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/build-android.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
name: Android Build APK

env:
BRANCH_NAME: ${{ github.base_ref || github.ref_name }}

on:
push:
tags:
- '*'
paths:
- 'version.properties'
workflow_dispatch:
inputs:
single_apk:
Expand Down Expand Up @@ -32,7 +35,7 @@ jobs:
java-version: 17
distribution: adopt

- if: ${{ inputs.single_apk == true }}
- if: ${{ inputs.single_apk == true || $BRANCH_NAME == 'develop' }}
run: sed -i -e '/isEnable/s/true/false/' app/build.gradle.kts

- name: Set MAL Client ID
Expand Down
12 changes: 8 additions & 4 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,12 @@ plugins {
id("com.google.devtools.ksp")
}

val properties = Properties()
properties.load(project.rootProject.file("private.properties").reader())
val properties = Properties().also {
it.load(project.rootProject.file("private.properties").reader())
}
val versionProps = Properties().also {
it.load(project.rootProject.file("version.properties").reader())
}

android {
compileSdk = 35
Expand All @@ -18,8 +22,8 @@ android {
applicationId = "com.axiel7.moelist"
minSdk = 23
targetSdk = 35
versionCode = 146
versionName = "3.7.1"
versionCode = versionProps.getProperty("code").toInt()
versionName = versionProps.getProperty("name")
setProperty("archivesBaseName", "moelist-v$versionName")

testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
Expand Down
2 changes: 2 additions & 0 deletions version.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
code = 146
name = 3.7.1

0 comments on commit 1b19b82

Please sign in to comment.