From 8dae6d95c77a58d3bab114a2eb7373fd422ba4a1 Mon Sep 17 00:00:00 2001 From: Hasib Prince Date: Fri, 11 Oct 2024 10:25:40 +0600 Subject: [PATCH 1/2] ci: added release job for test build --- .gitlab-ci.yml | 31 +++++++++++++++++++++++++++---- app/build.gradle.kts | 2 +- 2 files changed, 28 insertions(+), 5 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 1bf10d337..42ac3f0ea 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -5,6 +5,7 @@ variables: UNSIGNED_APK: "etar-release-unsigned.apk" COMMUNITY_APK: "Etar-community.apk" OFFICIAL_APK: "Etar-official.apk" + TEST_APK: "Etar-test.apk" stages: - auto-merge-main @@ -63,7 +64,7 @@ init_submodules: generate-apks: stage: gitlab_release rules: - - if: '$CI_COMMIT_TAG && $CI_COMMIT_REF_PROTECTED == "true"' + - if: '$CI_COMMIT_REF_PROTECTED == "true"' when: on_success needs: - init_submodules @@ -76,12 +77,13 @@ generate-apks: script: - | ./systemAppsUpdateInfo/scripts/generate-apks.sh \ - "$APK_PATH" "$UNSIGNED_APK" "$COMMUNITY_APK" "$OFFICIAL_APK" + "$APK_PATH" "$UNSIGNED_APK" "$COMMUNITY_APK" "$OFFICIAL_APK" "$TEST_APK" artifacts: paths: - $APK_PATH/$UNSIGNED_APK - $APK_PATH/$COMMUNITY_APK - $APK_PATH/$OFFICIAL_APK + - $APK_PATH/$TEST_APK create-json-files: stage: gitlab_release @@ -93,17 +95,37 @@ create-json-files: - generate-apks rules: - if: '$CI_COMMIT_TAG && $CI_COMMIT_REF_PROTECTED == "true"' - when: manual + when: on_success before_script: - apt update && apt install jq aapt -y script: - | ./systemAppsUpdateInfo/scripts/create-json-files.sh \ - "$APK_PATH" "$UNSIGNED_APK" "$COMMUNITY_APK" "$OFFICIAL_APK" + "$APK_PATH" "$UNSIGNED_APK" "$COMMUNITY_APK" "$OFFICIAL_APK" "$TEST_APK" artifacts: paths: - community.json - official.json + - test.json + +create-test-release: + stage: gitlab_release + dependencies: + - init_submodules + needs: + - init_submodules + - create-json-files + - generate-apks + rules: + - if: '$CI_COMMIT_TAG && $CI_COMMIT_REF_PROTECTED == "true"' + when: manual + before_script: + - apt update && apt install jq -y + script: + - | + ./systemAppsUpdateInfo/scripts/create-test-release.sh \ + "$APK_PATH" "$TEST_APK" + allow_failure: true create-release: stage: gitlab_release @@ -122,6 +144,7 @@ create-release: - | ./systemAppsUpdateInfo/scripts/create-release.sh \ "$APK_PATH" "$UNSIGNED_APK" "$COMMUNITY_APK" "$OFFICIAL_APK" + allow_failure: true .update-from-upstream: image: registry.gitlab.e.foundation/e/tools/docker-tools:latest diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 51c82a778..29f01b629 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -142,7 +142,7 @@ dependencies { val lifecycle_version = "2.8.4" implementation("androidx.lifecycle:lifecycle-livedata-ktx:$lifecycle_version") - // elib + // elib implementation("foundation.e:elib:0.0.1-alpha11") } -- GitLab From ffc0474b41c500ab1739ee33ae62c5fd9b7c295b Mon Sep 17 00:00:00 2001 From: Hasib Prince Date: Mon, 14 Oct 2024 14:45:31 +0600 Subject: [PATCH 2/2] create-release is turned into manaual job --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 42ac3f0ea..9d2ff9b9f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -137,7 +137,7 @@ create-release: - generate-apks rules: - if: '$CI_COMMIT_TAG && $CI_COMMIT_REF_PROTECTED == "true"' - when: on_success + when: manual before_script: - apt update && apt install jq -y script: -- GitLab