Skip to content

Commit

Permalink
Fix (#604)
Browse files Browse the repository at this point in the history
  • Loading branch information
KoalaSat authored Mar 12, 2024
2 parents d7c1351 + 741e416 commit e718057
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 19 deletions.
13 changes: 11 additions & 2 deletions .github/workflows/android-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,22 @@ jobs:
- name: Setup Gradle
uses: gradle/gradle-build-action@v2

- name: Generating one-time APK signature key
run: keytool -genkey -v -keystore keystore.jks -alias Nostros -keyalg RSA -keysize 2048 -validity 10000 -storepass ${{ secrets.KEY_STORE_PASS }} -keypass ${{ secrets.KEY_PASS }} -dname "cn=Nostros, ou=Actions, o=Nostros, c=GitHub"
- name: Decode Keystore
id: decode_keystore
uses: timheuer/base64-to-file@v1.2
with:
fileName: 'keystore.jks'
fileDir: './'
encodedString: ${{ secrets.KEYSTORE }}

- name: 'Build Android Release'
run: |
cd android
./gradlew assembleRelease
env:
KEY_ALIAS: ${{ secrets.KEY_ALIAS }}
KEY_PASS: ${{ secrets.KEY_PASS }}
KEY_STORE_PASS: ${{ secrets.KEY_STORE_PASS }}

- name: 'Check for non-FOSS libraries'
run: |
Expand Down
5 changes: 0 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,6 @@ on:
jobs:
android-build:
uses: KoalaSat/nostros/.github/workflows/android-build.yml@main
with:
env:
KEY_ALIAS: ${{ secrets.KEY_ALIAS }}
KEY_PASS: ${{ secrets.KEY_PASS }}
KEY_STORE_PASS: ${{ secrets.KEY_STORE_PASS }}
release:
needs: [android-build]
runs-on: ubuntu-latest
Expand Down
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@ local.properties
*.iml
*.hprof
.cxx/
*.keystore
!debug.keystore

# node.js
#
Expand Down
11 changes: 1 addition & 10 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -128,19 +128,10 @@ android {
}

release {
// We can leave these in environment variables
storeFile file('../../keystore.jks')
storeFile file("../../keystore.jks")
keyAlias System.getenv("KEY_ALIAS")

// These two lines make gradle believe that the signingConfigs
// section is complete. Without them, tasks like installRelease
// will not be available!
storePassword System.getenv("KEY_STORE_PASS")
keyPassword System.getenv("KEY_PASS")

enableV1Signing true
enableV2Signing true
enableV3Signing true
}
}
buildTypes {
Expand Down
Binary file added android/app/keystore.jks
Binary file not shown.

0 comments on commit e718057

Please sign in to comment.