forked from recloudstream/cloudstream
commit
1da670af80
2 changed files with 43 additions and 2 deletions
17
.github/workflows/prerelease.yml
vendored
17
.github/workflows/prerelease.yml
vendored
|
@ -3,6 +3,8 @@ name: Pre-release
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [ master ]
|
branches: [ master ]
|
||||||
|
paths-ignore:
|
||||||
|
- '*.md'
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
group: "pre-release"
|
group: "pre-release"
|
||||||
|
@ -24,8 +26,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:
|
||||||
|
@ -34,4 +47,4 @@ jobs:
|
||||||
prerelease: true
|
prerelease: true
|
||||||
title: "Pre-release Build"
|
title: "Pre-release Build"
|
||||||
files: |
|
files: |
|
||||||
app/build/outputs/apk/debug/*.apk
|
app/build/outputs/apk/prerelease/*.apk
|
||||||
|
|
|
@ -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