Android client for Gitea https://gitnex.com/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

64 lines
1.4 KiB

  1. stages:
  2. - test
  3. - build
  4. - sign
  5. - publish
  6. test:
  7. image: nextcloudci/android:android-49
  8. stage: test
  9. script:
  10. - ./gradlew test
  11. build:
  12. image: nextcloudci/android:android-49
  13. stage: build
  14. only:
  15. - master
  16. script:
  17. - ./gradlew build
  18. artifacts:
  19. paths:
  20. - app/build/outputs/
  21. expire_in: 15 minutes
  22. sign:
  23. image: nextcloudci/android:android-49
  24. stage: sign
  25. only:
  26. - master
  27. variables:
  28. OUTPUT: "signed.apk"
  29. GITEA: "https://gitea.com"
  30. KS_FILE: "ci_keystore.jks"
  31. script:
  32. - ./scripts/sign-build.sh
  33. artifacts:
  34. paths:
  35. - signed.apk
  36. expire_in: 15 minutes
  37. latest:
  38. image: tutum/curl
  39. stage: publish
  40. only:
  41. - master
  42. variables:
  43. WEBDAV_USERNAME: "GitNexBot"
  44. PLUGIN_FILE: "signed.apk"
  45. PLUGIN_DESTINATION: "https://cloud.swatian.com/remote.php/dav/files/GitNexBot/gitnex/builds/latest.apk"
  46. script:
  47. - curl -T "$PLUGIN_FILE" -u "$WEBDAV_USERNAME":"$WEBDAV_PASSWORD" "$PLUGIN_DESTINATION"
  48. release:
  49. image: tutum/curl
  50. stage: publish
  51. only:
  52. - tags
  53. variables:
  54. WEBDAV_USERNAME: "GitNexBot"
  55. PLUGIN_FILE: "signed.apk"
  56. script:
  57. - "[[ $CI_COMMIT_REF_NAME == *'-rc'* ]] && echo 'Upload blocked. Build seems to be a release candidate.' && exit 0"
  58. - curl -T "$PLUGIN_FILE" -u "$WEBDAV_USERNAME":"$WEBDAV_PASSWORD" 'https://cloud.swatian.com/remote.php/dav/files/GitNexBot/gitnex/releases/'"$CI_COMMIT_REF_NAME"'.apk'