mirror of
https://github.com/recloudstream/cloudstream.git
synced 2024-08-15 01:53:11 +00:00
hopefully make prerelese signed
This commit is contained in:
parent
761bb3aeb3
commit
7085413dca
2 changed files with 40 additions and 1 deletions
13
.github/workflows/prerelease.yml
vendored
13
.github/workflows/prerelease.yml
vendored
|
@ -24,8 +24,19 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
COMMIT_HASH="$(git log -1 --format='%H')"
|
COMMIT_HASH="$(git log -1 --format='%H')"
|
||||||
sed -i "s/<string name=\"prerelease_commit_hash\">unknown_prerelease<\/string>/<string name=\"prerelease_commit_hash\">$COMMIT_HASH<\/string>/g" app/src/main/res/values/strings.xml
|
sed -i "s/<string name=\"prerelease_commit_hash\">unknown_prerelease<\/string>/<string name=\"prerelease_commit_hash\">$COMMIT_HASH<\/string>/g" app/src/main/res/values/strings.xml
|
||||||
|
- name: Decode Keystore
|
||||||
|
env:
|
||||||
|
ENCODED_STRING: ${{ secrets.KEYSTORE }}
|
||||||
|
run: |
|
||||||
|
TMP_KEYSTORE_FILE_PATH="${RUNNER_TEMP}"/keystore
|
||||||
|
mkdir -p "${TMP_KEYSTORE_FILE_PATH}"
|
||||||
|
echo $ENCODED_STRING | base64 -di > "${TMP_KEYSTORE_FILE_PATH}"/prerelease_keystore.jks
|
||||||
- name: Run Gradle
|
- name: Run Gradle
|
||||||
run: ./gradlew assembleDebug
|
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 }}
|
||||||
- name: Create pre-release
|
- name: Create pre-release
|
||||||
uses: "marvinpinto/action-automatic-releases@latest"
|
uses: "marvinpinto/action-automatic-releases@latest"
|
||||||
with:
|
with:
|
||||||
|
|
|
@ -5,7 +5,27 @@ plugins {
|
||||||
id 'kotlin-android-extensions'
|
id 'kotlin-android-extensions'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
def tmpFilePath = System.getProperty("user.home") + "/work/_temp/keystore/"
|
||||||
|
def allFilesFromDir = new File(tmpFilePath).listFiles()
|
||||||
|
def prerelaseStoreFile = null
|
||||||
|
if (allFilesFromDir != null) {
|
||||||
|
prerelaseStoreFile = allFilesFromDir.first()
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
android {
|
android {
|
||||||
|
signingConfigs {
|
||||||
|
prerelease {
|
||||||
|
|
||||||
|
if (prerelaseStoreFile != null) {
|
||||||
|
storeFile = file(prerelaseStoreFile)
|
||||||
|
storePassword System.getenv("SIGNING_STORE_PASSWORD")
|
||||||
|
keyAlias System.getenv("SIGNING_KEY_ALIAS")
|
||||||
|
keyPassword System.getenv("SIGNING_KEY_PASSWORD")
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
compileSdkVersion 30
|
compileSdkVersion 30
|
||||||
buildToolsVersion "30.0.3"
|
buildToolsVersion "30.0.3"
|
||||||
|
|
||||||
|
@ -29,6 +49,14 @@ android {
|
||||||
debuggable true
|
debuggable true
|
||||||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||||||
}
|
}
|
||||||
|
prerelease {
|
||||||
|
buildConfigField("boolean", "BETA", "true")
|
||||||
|
signingConfig signingConfigs.prerelease
|
||||||
|
versionNameSuffix '-PRE'
|
||||||
|
minifyEnabled false
|
||||||
|
debuggable true
|
||||||
|
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||||||
|
}
|
||||||
}
|
}
|
||||||
compileOptions {
|
compileOptions {
|
||||||
sourceCompatibility JavaVersion.VERSION_1_8
|
sourceCompatibility JavaVersion.VERSION_1_8
|
||||||
|
|
Loading…
Reference in a new issue