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

Commit 13069f56 authored by Romain Hunault's avatar Romain Hunault 💻
Browse files

Use a variable for API authentication

parent e91b3ce6
Loading
Loading
Loading
Loading
Loading
+3 −4
Original line number Diff line number Diff line
@@ -22,8 +22,7 @@ before_script:
cache:
  key: ${CI_PROJECT_ID}
  paths:
  - ./gradlew :play-services-core:assembleWithMapboxWithNearbyRelease
  - ./gradlew :play-services-core:assembleWithMapboxWithoutNearbyRelease 
  - .gradle/

build:
  stage: build
@@ -46,7 +45,7 @@ publish:
    - branches                                   # Do not run this job on a branch
  script:
    - |
      curl --fail --output "/dev/null" --silent --show-error --write-out "HTTP response: ${http_code}\n\n" \
           --header 'Content-Type: application/json' --header "PRIVATE-TOKEN: c3fBLNAxyWnruPTCfzSs" \
      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\" }] } }" \
           --request POST https://gitlab.e.foundation/api/v4/projects/149/releases