diff --git a/.github/workflows/prerelease.yml b/.github/workflows/prerelease.yml index da939b68..a20c18e7 100644 --- a/.github/workflows/prerelease.yml +++ b/.github/workflows/prerelease.yml @@ -36,13 +36,16 @@ jobs: TMP_KEYSTORE_FILE_PATH="${RUNNER_TEMP}"/keystore mkdir -p "${TMP_KEYSTORE_FILE_PATH}" echo $ENCODED_STRING | base64 -di > "${TMP_KEYSTORE_FILE_PATH}"/prerelease_keystore.keystore + - name: Create Local Properties File + run: touch local.properties + - name: Add TMDB API Key + run: echo "TMDB_API_KEY=${{ secrets.TMDB_API_KEY }}" >> local.properties - name: Run Gradle run: ./gradlew app:assemblePrerelease env: SIGNING_KEY_ALIAS: ${{ secrets.SIGNING_KEY_ALIAS }} SIGNING_KEY_PASSWORD: ${{ secrets.SIGNING_KEY_PASSWORD }} SIGNING_STORE_PASSWORD: ${{ secrets.SIGNING_STORE_PASSWORD }} - TMDB_API_KEY: ${{ secrets.TMDB_API_KEY }} - name: Create pre-release uses: "marvinpinto/action-automatic-releases@latest" with: diff --git a/app/build.gradle b/app/build.gradle index 1a295517..29cbc3da 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -30,19 +30,22 @@ android { compileSdkVersion 31 buildToolsVersion "30.0.3" + def Properties properties = new Properties() + properties.load(project.rootProject.file("local.properties").newDataInputStream()) + defaultConfig { applicationId "com.lagradost.cloudstream3" minSdkVersion 21 targetSdkVersion 31 versionCode 34 - versionName "2.2.3" + versionName "2.3.3" resValue "string", "app_version", "${defaultConfig.versionName}${versionNameSuffix ?: ""}" buildConfigField("String", "BUILDDATE", "new java.text.SimpleDateFormat(\"yyyy-MM-dd HH:mm\").format(new java.util.Date(" + System.currentTimeMillis() + "L));") - buildConfigField("String", "TMDB_API_KEY", "\"" + System.getenv("TMDB_API_KEY") + "\"") + buildConfigField("String", "TMDB_API_KEY", "\"" + properties.getProperty("TMDB_API_KEY", "") + "\"") testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"