Skip to content

Commit

Permalink
feat: setup fastlane (#14)
Browse files Browse the repository at this point in the history
* feat: setup fastlane
  • Loading branch information
octera authored Aug 13, 2024
1 parent 16b1737 commit bc1d343
Show file tree
Hide file tree
Showing 18 changed files with 8,423 additions and 7,841 deletions.
11 changes: 9 additions & 2 deletions .github/workflows/develop-release-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- name: set up Ruby for fastlane
uses: ruby/setup-ruby@v1
with:
ruby-version: '2.6'
ruby-version: '3.3'
- name: set up JDK 17
uses: actions/setup-java@v2
with:
Expand Down Expand Up @@ -49,4 +49,11 @@ jobs:

# Step 3: Check the code with Android linter
- name: Run Android Linter
run: ./gradlew lintDebug
run: ./gradlew lintDebug

- name: Install bundle
run: |
bundle config path vendor/bundle
bundle install --jobs 4 --retry 3
- name: Attempt to test and build app throught fastlane
run: bundle exec fastlane test
16 changes: 12 additions & 4 deletions .github/workflows/master-release-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
- name: set up Ruby for fastlane
uses: ruby/setup-ruby@v1
with:
ruby-version: '2.6'
ruby-version: '3.3'
- name: set up JDK 17
uses: actions/setup-java@v2
with:
Expand Down Expand Up @@ -47,7 +47,15 @@ jobs:
run: ./gradlew lintDebug
- name: Create Google Play Config file
run: |
echo "$PLAY_CONFIG_JSON" > play_config.json.b64
base64 -d -i play_config.json.b64 > api-service-account.json
echo "$PLAY_STORE_CREDS" > api-service-account.json.b64
base64 -d -i api-service-account.json.b64 > api-service-account.json
env:
PLAY_CONFIG_JSON: ${{ secrets.PLAY_CONFIG_JSON }}
PLAY_CONFIG_JSON: ${{ secrets.PLAY_STORE_CREDS }}
- name: Install bundle
run: |
bundle config path vendor/bundle
bundle install --jobs 4 --retry 3
- name: Attempt to test and build app throught fastlane
run: bundle exec fastlane test
- name: Distribute app to Alpha track 🚀
run: bundle exec fastlane alpha
3 changes: 3 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
source "https://rubygems.org"

gem "fastlane"
21 changes: 18 additions & 3 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
import java.io.FileInputStream
import java.util.Properties

plugins {
alias(libs.plugins.android.application)
alias(libs.plugins.jetbrains.kotlin.android)
Expand All @@ -11,6 +14,10 @@ plugins {
id("com.google.firebase.crashlytics")
}

var keystorePropertiesFile = rootProject.file("keystore.properties")
var keystoreProperties = Properties()
keystoreProperties.load(FileInputStream(keystorePropertiesFile))

ktlint {
android.set(true)
outputColorName.set("RED")
Expand All @@ -25,22 +32,30 @@ android {
applicationId = "info.octera.droidstorybox"
minSdk = 21
targetSdk = 34
versionCode = 1
versionName = "1.0"
versionCode = 2
versionName = "0.2.0"

testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables {
useSupportLibrary = true
}
}

signingConfigs {
create("release") {
keyAlias = keystoreProperties["keyAlias"].toString()
keyPassword = keystoreProperties["keyPassword"].toString()
storeFile = keystoreProperties["storeFile"]?.let { file(it) }
storePassword = keystoreProperties["storePassword"].toString()
}
}
buildTypes {
release {
isMinifyEnabled = false
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro",
)
signingConfig = signingConfigs.getByName("release")
}
}
compileOptions {
Expand Down
2 changes: 2 additions & 0 deletions fastlane/Appfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
json_key_file("play-store-credentials.json") # Path to the json secret file - Follow https://docs.fastlane.tools/actions/supply/#setup to get one
package_name("info.octera.droidstorybox") # e.g. com.krausefx.app
38 changes: 38 additions & 0 deletions fastlane/Fastfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# This file contains the fastlane.tools configuration
# You can find the documentation at https://docs.fastlane.tools
#
# For a list of all available actions, check out
#
# https://docs.fastlane.tools/actions
#
# For a list of all available plugins, check out
#
# https://docs.fastlane.tools/plugins/available-plugins
#

# Uncomment the line if you want fastlane to automatically update itself
# update_fastlane

default_platform(:android)

platform :android do
desc "Runs all the tests"
lane :test do
gradle(task: "test")
end

desc "Submit a new Alpha Build to Google Play"
lane :beta do
gradle(task: "clean bundleRelease")
upload_to_play_store(track: 'alpha', skip_upload_apk: true)

# sh "your_script.sh"
# You can also use other beta testing services here
end

desc "Deploy a new version to the Google Play"
lane :deploy do
gradle(task: "clean bundleRelease")
upload_to_play_store(skip_upload_apk: true)
end
end
48 changes: 48 additions & 0 deletions fastlane/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
fastlane documentation
----

# Installation

Make sure you have the latest version of the Xcode command line tools installed:

```sh
xcode-select --install
```

For _fastlane_ installation instructions, see [Installing _fastlane_](https://docs.fastlane.tools/#installing-fastlane)

# Available Actions

## Android

### android test

```sh
[bundle exec] fastlane android test
```

Runs all the tests

### android beta

```sh
[bundle exec] fastlane android beta
```

Submit a new Alpha Build to Google Play

### android deploy

```sh
[bundle exec] fastlane android deploy
```

Deploy a new version to the Google Play

----

This README.md is auto-generated and will be re-generated every time [_fastlane_](https://fastlane.tools) is run.

More information about _fastlane_ can be found on [fastlane.tools](https://fastlane.tools).

The documentation of _fastlane_ can be found on [docs.fastlane.tools](https://docs.fastlane.tools).
11 changes: 11 additions & 0 deletions fastlane/metadata/android/fr-FR/full_description.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
Plongez dans l'univers magique de Nimilou, l'application de lecture d'histoires interactive pour enfants ! Explorez une vaste bibliothèque d'histoires captivantes, créées par des communautés de passionnés. Chaque histoire est un voyage unique où vos enfants peuvent interagir, apprendre et s'amuser.

Fonctionnalités principales :

Histoires interactives : Découvrez des récits captivants avec des animations, des choix interactifs, et plus encore !
Communauté créative : Accédez à une collection grandissante d'histoires créées et partagées par des utilisateurs du monde entier.
Gratuit et Open Source : Nimilou est une application gratuite, sans publicité, et son code source est disponible sur GitHub pour les contributeurs.
Liste de lecture personnalisée : Créez et gérez vos propres listes d'histoires préférées, et téléchargez-les pour une lecture hors ligne.
Facile à utiliser : Interface conviviale et adaptée aux enfants, conçue pour rendre la lecture accessible et amusante.

Téléchargez l'application, rzejoignez une communauté aujourd'hui et transformez chaque moment de lecture en une aventure inoubliable avec Nimilou !
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added fastlane/metadata/android/fr-FR/images/icon.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions fastlane/metadata/android/fr-FR/short_description.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Découvrez des histoires interactives pour enfants créées par la communauté !
1 change: 1 addition & 0 deletions fastlane/metadata/android/fr-FR/title.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Nimilou
Empty file.
16,112 changes: 8,280 additions & 7,832 deletions splash.ai

Large diffs are not rendered by default.

0 comments on commit bc1d343

Please sign in to comment.