diff --git a/.github/workflows/build-apks.yml b/.github/workflows/build-apks.yml index c874c22e..42333baa 100644 --- a/.github/workflows/build-apks.yml +++ b/.github/workflows/build-apks.yml @@ -23,12 +23,6 @@ jobs: - name: Checkout Repository uses: actions/checkout@v4 - - name: Set up Java - uses: actions/setup-java@v4 - with: - distribution: "temurin" - java-version: "17" - - name: Decode Keystore run: | echo "$KEYSTORE_BASE64" | base64 --decode > passcodes-staging.jks @@ -37,12 +31,18 @@ jobs: - name: Decode Keystore Properties run: | - echo "$KEYSTORE_PROPERTIES_BASE64" | base64 --decode > keystore.properties + echo "$KEYSTORE_PROPERTIES_BASE64" | base64 --decode > staging-keystore.properties env: KEYSTORE_PROPERTIES_BASE64: ${{ secrets.STAGING_KEYSTORE_PROPERTIES_BASE64 }} + - name: Set up Java + uses: actions/setup-java@v4 + with: + distribution: "temurin" + java-version: "17" + - name: Setup Gradle - uses: gradle/gradle-build-action@v3 + uses: gradle/actions/setup-gradle@v4 - name: Grant execute permission to gradlew run: chmod +x gradlew @@ -65,7 +65,7 @@ jobs: echo "Triggered by push to 'main' branch. Building staging variant." BUILD_VARIANT="staging" ./gradlew assembleStaging - APK_PATH=app/build/outputs/apk/staging/app-universal-staging-unsigned.apk + APK_PATH=app/build/outputs/apk/staging/app-universal-staging.apk fi # Set the output variables for the next steps. diff --git a/.gitignore b/.gitignore index 5e5c4fc2..b2b85d35 100644 --- a/.gitignore +++ b/.gitignore @@ -14,7 +14,7 @@ .externalNativeBuild .cxx local.properties -keystore.properties +*keystore.properties *.jks /.kotlin /release diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 3520897b..8cf118cb 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -45,7 +45,7 @@ android { } create("staging") { - val keystorePropertiesFile = rootProject.file("keystore.properties") + val keystorePropertiesFile = rootProject.file("staging-keystore.properties") if (keystorePropertiesFile.exists()) { val keystoreProperties = Properties() keystoreProperties.load(FileInputStream(keystorePropertiesFile)) @@ -102,10 +102,10 @@ android { } create("staging") { - if (rootProject.file("keystore.properties").exists()) { + if (rootProject.file("staging-keystore.properties").exists()) { signingConfig = signingConfigs.getByName("staging") } else { - logger.warn("WARNING: Staging build will not be signed as keystore.properties is missing.") + logger.warn("WARNING: Staging build will not be signed as staging-keystore.properties is missing.") // throw GradleException("Can't Sign Staging Build") }