From 476d19c01a620506de83b4e421eada73050132b2 Mon Sep 17 00:00:00 2001 From: Hasib Prince Date: Wed, 16 Oct 2024 23:05:08 +0600 Subject: [PATCH] ci: added release job for test build --- .gitlab-ci.yml | 32 +++++++++++++++++++++++++++----- 1 file changed, 27 insertions(+), 5 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 39f5a1bd..edd75f3c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -6,6 +6,7 @@ variables: UNSIGNED_APK: "eDrive-release-unsigned.apk" COMMUNITY_APK: "eDrive-community.apk" OFFICIAL_APK: "eDrive-official.apk" + TEST_APK: "eDrive-test.apk" stages: - build @@ -97,12 +98,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 @@ -114,18 +116,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 @@ -137,10 +158,11 @@ 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: - | ./systemAppsUpdateInfo/scripts/create-release.sh \ - "$APK_PATH" "$UNSIGNED_APK" "$COMMUNITY_APK" "$OFFICIAL_APK" \ No newline at end of file + "$APK_PATH" "$UNSIGNED_APK" "$COMMUNITY_APK" "$OFFICIAL_APK" + allow_failure: true \ No newline at end of file -- GitLab