Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 966ff7e3 authored by Vincent Bourgmayer's avatar Vincent Bourgmayer
Browse files

Merge branch 'v1-s-2291-createReleaseOnProtectedTag' into 'v1-s'

feature: add CI job to create release for Android S version of BlissLauncher in order to update through app lounge

See merge request e/os/BlissLauncher3!65
parents d0bb8a6a 2597e380
Loading
Loading
Loading
Loading
Loading
+81 −1
Original line number Diff line number Diff line
@@ -2,9 +2,14 @@ image: "registry.gitlab.e.foundation/e/os/docker-android-apps-cicd:latest"

variables:
  SENTRY_DSN: ${SENTRY_DSN}
  APK_PATH: "build/outputs/apk/blissWithQuickstep/release"
  UNSIGNED_APK: "BlissLauncher-apiS-release.apk"
  COMMUNITY_APK: "BlissLauncher-apiS-community.apk"
  OFFICIAL_APK: "BlissLauncher-apiS-official.apk.apk"

stages:
  - build
  - gitlab_release

before_script:
  - export GRADLE_USER_HOME=$(pwd)/.gradle
@@ -31,3 +36,78 @@ blissWithQuickstepRelease:
  artifacts:
    paths:
      - build/outputs/apk

init_submodules:
  stage: gitlab_release
  rules:
    - if: '$CI_COMMIT_TAG && $CI_COMMIT_REF_PROTECTED == "true"'
      when: on_success
  script:
    - git clone https://gitlab.e.foundation/e/os/system-apps-update-info.git systemAppsUpdateInfo
  artifacts:
    paths:
      - systemAppsUpdateInfo/scripts/


generate-apks:
  stage: gitlab_release
  rules:
    - if: '$CI_COMMIT_TAG && $CI_COMMIT_REF_PROTECTED == "true"' 
      when: on_success
  needs:
    - init_submodules
    - blissWithQuickstepRelease
  dependencies:
    - init_submodules
    - blissWithQuickstepRelease
  before_script:
    - apt update && apt install apksigner -y
  script:
    - |
      ./systemAppsUpdateInfo/scripts/generate-apks.sh \
      "$APK_PATH" "$UNSIGNED_APK" "$COMMUNITY_APK" "$OFFICIAL_APK"
  artifacts:
    paths:
      - $APK_PATH/$UNSIGNED_APK
      - $APK_PATH/$COMMUNITY_APK
      - $APK_PATH/$OFFICIAL_APK

create-json-files:
  stage: gitlab_release
  dependencies:
    - init_submodules
    - generate-apks
  needs:
    - init_submodules
    - generate-apks
  rules:
    - if: '$CI_COMMIT_TAG && $CI_COMMIT_REF_PROTECTED == "true"'
      when: manual
  before_script:
    - apt update && apt install jq aapt -y
  script:
    - |
      ./systemAppsUpdateInfo/scripts/create-json-files.sh \
      "$APK_PATH" "$UNSIGNED_APK" "$COMMUNITY_APK" "$OFFICIAL_APK"
  artifacts:
    paths:
      - community.json
      - official.json

create-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: on_success
  before_script:
    - apt update && apt install jq -y
  script:
    - |
      ./systemAppsUpdateInfo/scripts/create-release.sh \
      "$APK_PATH" "$UNSIGNED_APK" "$COMMUNITY_APK" "$OFFICIAL_APK"
+27 −0
Original line number Diff line number Diff line
@@ -65,6 +65,33 @@ It is the default launcher for [/e/ OS](https://e.foundation/e-os/).

- Now it is totally ready to use and play around with!

## Recurrent task
### Publish a new release for update through app lounge
For this, you need to create a protected tag
which follow this format: `v1.2.3-s`, `v1.2.3-t`

The Android letter is important to let app lounge know which release to use!

also note, that tag with `v*` format will all be protected.


### When a new android version is supported
#### Update .gitlab-ci.yml
When a new Android version is supported, we need to add the gitlab-ci's job that make release to update it through app lounge

1. Add Ci variables:
```
  APK_PATH: "build/outputs/apk/blissWithQuickstep/release"
  UNSIGNED_APK: "BlissLauncher-apiT-release.apk"
  COMMUNITY_APK: "BlissLauncher-apiT-community.apk"
  OFFICIAL_APK: "BlissLauncher-apiT-official.apk.apk"
``` 
but you need to adapt the letter after the api work for `UNSIGNED_APK`, `COMMUNITY_APK`, `OFFICIAL_APK`.

2. Add stage `gitlab_release` in `stages` entry

3. Copy paste jobs from one of a branch for a supported Android version : `init_submodules`, `generate-apks`, `create-json-files` and `create-release`

## License

```text