mirror of
https://github.com/recloudstream/cloudstream.git
synced 2024-08-15 01:53:11 +00:00
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:
|
||||
push:
|
||||
branches: [ master ]
|
||||
paths-ignore:
|
||||
- '*.md'
|
||||
|
||||
concurrency:
|
||||
group: "pre-release"
|
||||
|
@ -24,8 +26,19 @@ jobs:
|
|||
run: |
|
||||
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
|
||||
- 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
|
||||
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
|
||||
uses: "marvinpinto/action-automatic-releases@latest"
|
||||
with:
|
||||
|
@ -34,4 +47,4 @@ jobs:
|
|||
prerelease: true
|
||||
title: "Pre-release Build"
|
||||
files: |
|
||||
app/build/outputs/apk/debug/*.apk
|
||||
app/build/outputs/apk/prerelease/*.apk
|
||||
|
|
|
@ -5,7 +5,27 @@ plugins {
|
|||
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 {
|
||||
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
|
||||
buildToolsVersion "30.0.3"
|
||||
|
||||
|
@ -29,6 +49,14 @@ android {
|
|||
debuggable true
|
||||
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 {
|
||||
sourceCompatibility JavaVersion.VERSION_1_8
|
||||
|
|
Loading…
Reference in a new issue