Last active
November 27, 2021 23:25
-
-
Save adesamp/6d4850d052e6c8cfeacab5fd9c124288 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
image: softartdev/android-fastlane | |
cache: | |
key: ${CI_PROJECT_ID} | |
paths: | |
- .gradle/ | |
before_script: | |
- chmod +x ./gradlew | |
- echo "$ENV_PROP" > local.properties | |
stages: | |
- build | |
- inspection | |
- deploy | |
linter: | |
stage: inspection | |
script: | |
- ./gradlew ktlint | |
only: | |
- merge_requests | |
linterFormat: | |
stage: inspection | |
script: | |
- ./gradlew ktlintFormat | |
only: | |
- merge_requests | |
unitTests: | |
stage: inspection | |
script: | |
- ./gradlew test | |
only: | |
- merge_requests | |
build: | |
stage: build | |
script: | |
- ./gradlew assembleDebug | |
artifacts: | |
paths: | |
- app/build/outputs/ | |
only: | |
- merge_requests | |
uploadPlayStoreProduction: | |
stage: deploy | |
script: | |
- echo "$SERVICE_JSON" > service_account.json | |
- aliasName=$(cat local.properties | awk -F= '{print $2}' | awk NF | awk '{a[i++]=$0} END {for (j=i-1; j>=0;) print a[j--] }' | awk NR==1) | |
- storePass=$(cat local.properties | awk -F= '{print $2}' | awk NF | awk '{a[i++]=$0} END {for (j=i-1; j>=0;) print a[j--] }' | awk NR==2) | |
- keyPass=$(cat local.properties | awk -F= '{print $2}' | awk NF | awk '{a[i++]=$0} END {for (j=i-1; j>=0;) print a[j--] }' | awk NR==3) | |
- ksPath=$(cd "$(dirname "app/justvers.jks")" && pwd)/$(basename "app/justvers.jks") | |
- bundle exec fastlane deploy pathKS:$ksPath variant:release alias:$aliasName storePassword:$storePass keyPassword:$keyPass | |
only: | |
- master | |
uploadPlayStoreInternal: | |
stage: deploy | |
script: | |
- echo "$SERVICE_JSON" > service_account.json | |
- bundle exec fastlane internal | |
only: | |
- dev |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment