From 0df05545c4684963c6e437dcd6ceb86a6a7af003 Mon Sep 17 00:00:00 2001 From: rumboalla Date: Thu, 28 Mar 2024 18:28:17 +0100 Subject: [PATCH] Programmatically get current year. Only release on 3.x branch. --- .github/workflows/build.yml | 2 +- app/src/main/kotlin/com/apkupdater/ui/screen/SettingsScreen.kt | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 771b40a7..b7b2fdf4 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -35,7 +35,7 @@ jobs: - name: Create Release uses: softprops/action-gh-release@v2 - if: ${{ env.BRANCH }} == "3.x" + if: github.ref == 'refs/heads/3.x' with: tag_name: 0.0.${{ github.run_number }}-ci name: CI-Release-${{ env.BRANCH }}-${{ github.run_number }} diff --git a/app/src/main/kotlin/com/apkupdater/ui/screen/SettingsScreen.kt b/app/src/main/kotlin/com/apkupdater/ui/screen/SettingsScreen.kt index 655e34b5..f2876f84 100644 --- a/app/src/main/kotlin/com/apkupdater/ui/screen/SettingsScreen.kt +++ b/app/src/main/kotlin/com/apkupdater/ui/screen/SettingsScreen.kt @@ -57,6 +57,7 @@ import com.apkupdater.ui.theme.statusBarColor import com.apkupdater.util.isAndroidTv import com.apkupdater.viewmodel.SettingsViewModel import org.koin.androidx.compose.koinViewModel +import java.util.Calendar @Composable @@ -78,7 +79,7 @@ fun About() = LazyColumn( LoadingImageApp(BuildConfig.APPLICATION_ID) LargeTitle(stringResource(R.string.app_name), Modifier.align(CenterHorizontally)) MediumText("${BuildConfig.VERSION_NAME} (${BuildConfig.VERSION_CODE})", Modifier.align(CenterHorizontally)) - MediumText("Copyright © 2016-2023 rumboalla", Modifier.align(CenterHorizontally)) + MediumText("Copyright © 2016-${Calendar.getInstance().get(Calendar.YEAR)} rumboalla", Modifier.align(CenterHorizontally)) } } item {