Skip to content

Commit

Permalink
CI Builds
Browse files Browse the repository at this point in the history
* Set version name for CI Builds.
  • Loading branch information
rumboalla committed Mar 23, 2024
1 parent 8c649c5 commit ffe24e4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@ jobs:
distribution: 'zulu'
java-version: '17'

- name: Set BUILD_TAG
run: echo "BUILD_TAG=.ci" >> $GITHUB_ENV

- name: Decode Keystore
env:
KEYSTORE: ${{ secrets.KEYSTORE }}
Expand All @@ -28,6 +25,9 @@ jobs:
run: echo $PROPERTIES | base64 --decode > local.properties

- name: Build with Gradle
env:
BUILD_TAG: ".ci"
BUILD_NUMBER: ${{ github.run_number }}
run: ./gradlew build

- name: Get current branch name
Expand All @@ -37,7 +37,7 @@ jobs:
uses: softprops/action-gh-release@v2
if: ${{ env.BRANCH }} == "3.x"
with:
tag_name: 0.0.${{ github.run_number }}-ci
tag_name: 3.1.${{ github.run_number }}-ci
name: CI-Release-${{ env.BRANCH }}-${{ github.run_number }}
files: ./app/build/outputs/apk/release/com.apkupdater.ci-release.apk
body: ${{ github.event.head_commit.message }}
Expand Down
3 changes: 2 additions & 1 deletion app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,13 @@ android {
namespace = "com.apkupdater"
compileSdk = 34

val buildNumber = System.getenv("BUILD_NUMBER").orEmpty()
defaultConfig {
applicationId = "com.apkupdater" + System.getenv("BUILD_TAG").orEmpty()
minSdk = 21
targetSdk = 34
versionCode = 52
versionName = "3.0.3"
versionName = if (buildNumber.isEmpty()) "3.0.3" else "3.1.$buildNumber"
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
}
Expand Down

0 comments on commit ffe24e4

Please sign in to comment.