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

Commit 6a848505 authored by Romain Hunault's avatar Romain Hunault 💻
Browse files

Multiple signing conf

parent 81c3c016
Loading
Loading
Loading
Loading
+18 −6
Original line number Diff line number Diff line
@@ -26,26 +26,38 @@ cache:

build:
  stage: build
  script:
  rules:
    - if: $CI_COMMIT_TAG && $CI_COMMIT_REF_PROTECTED == "true"
      when: never
    - when: always
  before_script:
  - echo sdk.dir $ANDROID_HOME > local.properties
  - echo mapbox.key $MAPBOX_KEY >> local.properties
  - echo mapbox.enabled true >> local.properties
  - echo "${KEYSTORE}" | base64 -d > play-services-core/e.keystore
  - export TERM=dumb
  - export JAVA_OPTS="-XX:+CMSClassUnloadingEnabled -XX:+HeapDumpOnOutOfMemoryError -Xmx4096m"
  script:
  - ./gradlew assembleDebug
  - ./gradlew assembleRelease
  artifacts:
    paths:
    - play-services-core/build/outputs/apk/

build-release:
  extends: build
  rules:
    - if: $CI_COMMIT_TAG && $CI_COMMIT_REF_PROTECTED == "true"
  script:
  - ./gradlew assemble

publish:
  stage: publish
  only:
    - tags                                       # Run only on tags
  except:
    - branches                                   # Do not run this job on a branch
  rules:
    - if: $CI_COMMIT_TAG && $CI_COMMIT_REF_PROTECTED == "true"
  script:
    - |
      curl --fail --output "/dev/null" --silent --show-error \
           --header 'Content-Type: application/json' --header "PRIVATE-TOKEN: ${PUBLICATION_TOKEN}" \
           --data "{\"ref\" : \"${CI_COMMIT_SHA}\",\"name\": \"${CI_COMMIT_TAG}\", \"tag_name\": \"${CI_COMMIT_TAG}\", \"description\": \"${CI_COMMIT_TITLE}\", \"assets\": {\"links\": [{\"name\": \"GMSCore.apk\", \"url\": \"https://gitlab.e.foundation/api/v4/projects/149/jobs/artifacts/${CI_COMMIT_TAG}/raw/play-services-core/build/outputs/apk/withMapboxWithNearby/release/play-services-core-withMapbox-withNearby-release-unsigned.apk?job=build\", \"filepath\": \"/play-services-core/build/outputs/apk/withMapboxWithNearby/release/play-services-core-withMapbox-withNearby-release-unsigned.apk\", \"link_type\":\"other\" }] } }" \
           --data "{\"ref\":\"${CI_COMMIT_SHA}\",\"name\":\"${CI_COMMIT_TAG}\",\"tag_name\":\"${CI_COMMIT_TAG}\",\"description\":\"${CI_COMMIT_TITLE}\",\"assets\":{\"links\":[{\"name\":\"GmsCore-test.apk\",\"url\":\"https://gitlab.e.foundation/api/v4/projects/149/jobs/artifacts/${CI_COMMIT_TAG}/raw/play-services-core/build/outputs/apk/withMapboxWithNearby/releaseTest/play-services-core-withMapbox-withNearby-releaseTest.apk?job=build-release\",\"link_type\":\"package\"},{\"name\":\"GmsCore-dev.apk\",\"url\":\"https://gitlab.e.foundation/api/v4/projects/149/jobs/artifacts/${CI_COMMIT_TAG}/raw/play-services-core/build/outputs/apk/withMapboxWithNearby/releaseDev/play-services-core-withMapbox-withNearby-releaseDev.apk?job=build-release\",\"link_type\":\"package\"},{\"name\":\"GmsCore-stable.apk\",\"url\":\"https://gitlab.e.foundation/api/v4/projects/149/jobs/artifacts/${CI_COMMIT_TAG}/raw/play-services-core/build/outputs/apk/withMapboxWithNearby/releaseStable/play-services-core-withMapbox-withNearby-releaseStable.apk?job=build-release\",\"link_type\":\"package\"}]}}" \
           --request POST https://gitlab.e.foundation/api/v4/projects/149/releases
+10 −0
Original line number Diff line number Diff line
@@ -19,6 +19,16 @@ android {
        sourceCompatibility = 1.8
        targetCompatibility = 1.8
    }

    buildTypes {
        release {}

        releaseTest {}

        releaseDev {}

        releaseStable {}
    }
}

dependencies {
+10 −0
Original line number Diff line number Diff line
@@ -43,4 +43,14 @@ android {
        sourceCompatibility = 1.8
        targetCompatibility = 1.8
    }

    buildTypes {
        release {}

        releaseTest {}

        releaseDev {}

        releaseStable {}
    }
}
+10 −0
Original line number Diff line number Diff line
@@ -42,6 +42,16 @@ android {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }

    buildTypes {
        release {}

        releaseTest {}

        releaseDev {}

        releaseStable {}
    }
}

dependencies {
+10 −0
Original line number Diff line number Diff line
@@ -30,6 +30,16 @@ android {
        sourceCompatibility = 1.8
        targetCompatibility = 1.8
    }

    buildTypes {
        release {}

        releaseTest {}

        releaseDev {}

        releaseStable {}
    }
}

dependencies {
Loading