Skip to content

Commit

Permalink
Inject signing config into build.gradle
Browse files Browse the repository at this point in the history
  • Loading branch information
MarmadileManteater committed Feb 3, 2024
1 parent 5a49c76 commit 02aa2a7
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/buildAndroid.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,21 @@ jobs:
- name: 📦 Pack for 📱Android
run: yarn pack:android:dev

- name: 🦴 Fetch keystore from secrets
run: |
while read -r line;
do
echo "${line}" >> freetube.keystore.asc
done <<< '${{ secrets.KEYSTORE }}'
gpg -d --passphrase '${{ secrets.KEYSTORE_PASSWORD }}' --batch freetube.keystore.asc >> freetube.keystore
- name: Inject signing config from secrets
run: |
sed -i '@// inject signing config@//inject signing config\r\nstorePassword = "${{ secrets.KEYSTORE_PASSWORD }}"@g' android/app/build.gradle.kts
sed -i '@// inject signing config@//inject signing config\r\nstoreFile = file("../../freetube.keystore")@g' android/app/build.gradle.kts
sed -i '@// inject signing config@//inject signing config\r\nkeyPassword = "${{ secrets.KEYSTORE_PASSWORD }}"@g' android/app/build.gradle.kts
sed -i '@// inject signing config@keyAlias = "freetubecordova"@g' android/app/build.gradle.kts
- name: Update name
run: |
sed -i 's/"FreeTube Android"/"FreeTube Nightly"/g' android/settings.gradle.kts
Expand Down
6 changes: 6 additions & 0 deletions android/app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,11 @@ plugins {
}

android {
signingConfigs {
getByName("debug") {
// inject signing config
}
}
namespace = "io.freetubeapp.freetube"
compileSdk = 34
dataBinding {
Expand All @@ -58,6 +63,7 @@ android {
versionName = versionInfo.version

testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"

}

buildTypes {
Expand Down

0 comments on commit 02aa2a7

Please sign in to comment.