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.
 
 
 

70 lines
1.5 KiB

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