Skip to content

Commit 18d8399

Browse files
committed
ci skip:区分nightly构建与最终发布版本
1 parent cff3615 commit 18d8399

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

.github/workflows/build_android.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ env:
1010
SIGN_KEY_STORE_PASSWORD: ${{ secrets.SIGN_KEY_STORE_PASSWORD || 'passwd' }}
1111
SIGN_KEY_PASSWORD: ${{ secrets.SIGN_KEY_PASSWORD || 'passwd' }}
1212
SIGN_KEY_STORE_FILE: ${{ github.workspace }}/keystore.jks
13+
NIGHTLY: true
1314
jobs:
1415
build:
1516
runs-on: ubuntu-latest

composeApp/build.gradle.kts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,12 +175,17 @@ android {
175175
versionNameSuffix = ".d$gitVersionCode.$gitVersionName"
176176
}
177177
release {
178+
val nightly = System.getenv("NIGHTLY")?.toBoolean() == true
178179
isMinifyEnabled = true
179180
proguardFiles(
180181
getDefaultProguardFile("proguard-android-optimize.txt"),
181182
"proguard-rules.pro"
182183
)
183-
versionNameSuffix = ".r$gitVersionCode.$gitVersionName"
184+
if (nightly) {
185+
versionNameSuffix = ".n$gitVersionCode.nightly"
186+
} else {
187+
versionNameSuffix = ".r$gitVersionCode.$gitVersionName"
188+
}
184189
signingConfig = signingConfigs.getByName("sign")
185190
}
186191
}

0 commit comments

Comments
 (0)