Skip to content
Snippets Groups Projects
Commit 36eac10f authored by Aleksandras Kostarevas's avatar Aleksandras Kostarevas
Browse files

Update CI

parent 6a6c9bff
No related branches found
No related tags found
No related merge requests found
......@@ -10,7 +10,33 @@ variables:
stages: # List of stages for jobs, and their order of execution
- build
build:
buildUnstable:
tags:
- docker
stage: build
before_script:
- git fetch origin master:master
- export VERSION_NAME=`git describe --tags --dirty`
- export VERSION_CODE=`git rev-list --first-parent --count master`
- echo $VERSION_CODE $VERSION_NAME
- ./setUpPropertiesCI.sh
script:
- gradle assembleUnstableRelease -s
- mv build/outputs/apk/unstable/release/latinime-unstable-release.apk ./keyboard-unstable-$VERSION_NAME.apk
- touch VERSION_CODE_$VERSION_CODE.txt
- touch VERSION_NAME_$VERSION_NAME.txt
- echo "Keyboard (Unstable) $VERSION_NAME - https://gitlab.futo.org/alex/latinime/-/jobs/$CI_JOB_ID/artifacts/raw/keyboard-unstable-$VERSION_NAME.apk"
- echo $VERSION_CODE $VERSION_NAME
- ./uploadNightly.sh ./keyboard-unstable-$VERSION_NAME.apk $VERSION_CODE $VERSION_NAME
artifacts:
name: "keyboard-unstable-$VERSION_NAME"
paths:
- ./*.apk
- ./*.aab
- ./*.txt
when: manual
buildStable:
tags:
- docker
stage: build
......@@ -34,9 +60,8 @@ build:
- touch VERSION_NAME_$VERSION_NAME.txt
- echo "Keyboard $VERSION_NAME - https://gitlab.futo.org/alex/latinime/-/jobs/$CI_JOB_ID/artifacts/raw/keyboard-$VERSION_NAME.apk"
- echo $VERSION_CODE $VERSION_NAME
- ./uploadNightly.sh
artifacts:
name: "keyboard-$VERSION_NAME"
name: "keyboard-stable-$VERSION_NAME"
paths:
- ./*.apk
- ./*.aab
......
......@@ -2,4 +2,11 @@
aws configure set aws_access_key_id $KEYBOARD_R2_ACCESS_KEY_ID
aws configure set aws_secret_access_key $KEYBOARD_R2_SECRET_ACCESS_KEY
aws configure set region $KEYBOARD_R2_DEFAULT_REGION
aws s3 cp ./keyboard*.apk s3://$KEYBOARD_R2_BUCKET_NAME/nightly.apk --endpoint=$KEYBOARD_R2_ENDPOINT_URL
\ No newline at end of file
aws s3 cp "$1" s3://$KEYBOARD_R2_BUCKET_NAME/nightly.apk --endpoint=$KEYBOARD_R2_ENDPOINT_URL
echo "$2" > nightly_version
echo "https://keyboard.futo.org/nightly.apk" >> nightly_version
echo "$3" >> nightly_version
aws s3 cp nightly_version s3://$KEYBOARD_R2_BUCKET_NAME/nightly_version --endpoint=$KEYBOARD_R2_ENDPOINT_URL
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment