lbry-fdroid/.gitlab-ci.yml

76 lines
3.5 KiB
YAML
Raw Normal View History

2019-03-26 15:08:50 +01:00
stages:
- build
- deploy
- release
2019-08-10 12:25:57 +01:00
build apk:
2019-03-26 15:08:50 +01:00
stage: build
image: lbry/android-base:platform-28
2019-03-26 15:08:50 +01:00
before_script:
2020-08-19 18:09:37 +01:00
- echo "$PGP_PRIVATE_KEY" | gpg --batch --import
- echo "deb https://dl.bintray.com/sobolevn/deb git-secret main" | tee -a /etc/apt/sources.list
- wget -O - https://api.bintray.com/users/sobolevn/keys/gpg/public.key | apt-key add -
- apt-get -y update && apt-get -y install build-essential ca-certificates curl git gpg-agent openjdk-8-jdk software-properties-common wget zipalign git-secret
- git secret reveal
- chmod u+x $CI_PROJECT_DIR/gradlew
- export BUILD_VERSION=$($CI_PROJECT_DIR/gradlew -p $CI_PROJECT_DIR -q printVersionName --console=plain | tail -1)
2019-08-10 12:25:57 +01:00
artifacts:
paths:
- bin/browser-*-release__arm.apk
- bin/browser-*-release__arm64.apk
2019-08-10 12:25:57 +01:00
expire_in: 1 week
script:
- export PATH=/usr/bin:$PATH
2020-08-19 18:09:37 +01:00
- export ANDROID_SDK_ROOT=~/.buildozer/android/platform/android-sdk-23
- chmod u+x ./release.sh
- ./release.sh
2020-08-19 18:09:37 +01:00
- cp bin/browser-$BUILD_VERSION-release__arm.apk /dev/null
- cp bin/browser-$BUILD_VERSION-release__arm64.apk /dev/null
2019-03-26 15:08:50 +01:00
deploy build.lbry.io:
image: python:stretch
2019-03-26 15:08:50 +01:00
stage: deploy
dependencies:
- build apk
2019-03-26 15:08:50 +01:00
before_script:
2020-08-19 18:14:13 +01:00
- apt-get -y update && apt-get -y install apt-transport-https
2020-08-19 18:09:37 +01:00
- echo "$PGP_PRIVATE_KEY" | gpg --batch --import
- echo "deb https://dl.bintray.com/sobolevn/deb git-secret main" | tee -a /etc/apt/sources.list
- wget -O - https://api.bintray.com/users/sobolevn/keys/gpg/public.key | apt-key add -
2020-08-19 18:14:13 +01:00
- apt-get -y update && apt-get -y install openjdk-8-jdk git git-secret
2019-03-26 15:08:50 +01:00
- pip install awscli
- chmod u+x $CI_PROJECT_DIR/gradlew
2020-08-19 18:09:37 +01:00
- git secret reveal
- export BUILD_VERSION=$($CI_PROJECT_DIR/gradlew -p $CI_PROJECT_DIR -q printVersionName --console=plain | tail -1)
2019-08-10 12:25:57 +01:00
- export BUILD_APK_FILENAME__32=browser-$BUILD_VERSION-release__arm.apk
- export BUILD_APK_FILENAME__64=browser-$BUILD_VERSION-release__arm64.apk
2019-03-26 15:08:50 +01:00
script:
2019-08-10 12:25:57 +01:00
- aws s3 cp bin/$BUILD_APK_FILENAME__64 s3://build.lbry.io/android/build-${CI_PIPELINE_IID}_commit-${CI_COMMIT_SHA:0:7}/$BUILD_APK_FILENAME__64
- aws s3 cp bin/$BUILD_APK_FILENAME__32 s3://build.lbry.io/android/build-${CI_PIPELINE_IID}_commit-${CI_COMMIT_SHA:0:7}/$BUILD_APK_FILENAME__32
- aws s3 cp bin/$BUILD_APK_FILENAME__64 s3://build.lbry.io/android/push.apk
2019-03-26 15:08:50 +01:00
release apk:
image: python:stretch
2019-03-26 15:08:50 +01:00
stage: release
only:
- tags
dependencies:
- build apk
2019-03-26 15:08:50 +01:00
before_script:
2020-08-19 18:14:13 +01:00
- apt-get -y update && apt-get -y install apt-transport-https
2020-08-19 18:09:37 +01:00
- echo "$PGP_PRIVATE_KEY" | gpg --batch --import
- echo "deb https://dl.bintray.com/sobolevn/deb git-secret main" | tee -a /etc/apt/sources.list
- wget -O - https://api.bintray.com/users/sobolevn/keys/gpg/public.key | apt-key add -
2020-08-19 18:14:13 +01:00
- apt-get -y update && apt-get -y install openjdk-8-jdk git git-secret
2019-03-26 15:08:50 +01:00
- pip install awscli githubrelease
2020-08-19 18:09:37 +01:00
- git secret reveal
- chmod u+x $CI_PROJECT_DIR/gradlew
- export BUILD_VERSION=$($CI_PROJECT_DIR/gradlew -p $CI_PROJECT_DIR -q printVersionName --console=plain | tail -1)
2019-08-10 12:25:57 +01:00
- export BUILD_APK_FILENAME__32=browser-$BUILD_VERSION-release__arm.apk
- export BUILD_APK_FILENAME__64=browser-$BUILD_VERSION-release__arm64.apk
2019-03-26 15:08:50 +01:00
script:
2019-08-10 12:25:57 +01:00
- githubrelease release lbryio/lbry-android create $CI_COMMIT_TAG --publish bin/$BUILD_APK_FILENAME__64 bin/$BUILD_APK_FILENAME__32
2019-08-20 19:57:47 +01:00
- githubrelease release lbryio/lbry-android edit $CI_COMMIT_TAG --draft
2019-08-12 14:33:19 +01:00
- aws s3 cp bin/$BUILD_APK_FILENAME__64 s3://build.lbry.io/android/latest.apk