forked from recloudstream/cloudstream
add signing?
This commit is contained in:
parent
079aae8afd
commit
c29eabb399
2 changed files with 34 additions and 23 deletions
37
.github/workflows/prerelease.yml
vendored
37
.github/workflows/prerelease.yml
vendored
|
@ -16,6 +16,13 @@ jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
|
- name: Generate access token
|
||||||
|
id: generate_token
|
||||||
|
uses: tibdex/github-app-token@v1
|
||||||
|
with:
|
||||||
|
app_id: ${{ secrets.GH_APP_ID }}
|
||||||
|
private_key: ${{ secrets.GH_APP_KEY }}
|
||||||
|
repository: "recloudstream/secrets"
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- name: Set up JDK 11
|
- name: Set up JDK 11
|
||||||
uses: actions/setup-java@v2
|
uses: actions/setup-java@v2
|
||||||
|
@ -31,22 +38,26 @@ 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\" translatable=\"false\">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\" translatable=\"false\">unknown_prerelease<\/string>/<string name=\"prerelease_commit_hash\">$COMMIT_HASH<\/string>/g" app/src/main/res/values/strings.xml
|
||||||
# - name: Decode Keystore
|
|
||||||
# env:
|
- name: Fetch keystore
|
||||||
# ENCODED_STRING: ${{ secrets.KEYSTORE }}
|
id: fetch_keystore
|
||||||
# run: |
|
run: |
|
||||||
# TMP_KEYSTORE_FILE_PATH="${RUNNER_TEMP}"/keystore
|
TMP_KEYSTORE_FILE_PATH="${RUNNER_TEMP}"/keystore
|
||||||
# mkdir -p "${TMP_KEYSTORE_FILE_PATH}"
|
mkdir -p "${TMP_KEYSTORE_FILE_PATH}"
|
||||||
# echo $ENCODED_STRING | base64 -di > "${TMP_KEYSTORE_FILE_PATH}"/prerelease_keystore.keystore
|
curl -H "Authorization: token ${{ steps.generate_token.outputs.token }}" -o "${TMP_KEYSTORE_FILE_PATH}/prerelease_keystore.keystore" "https://raw.githubusercontent.com/recloudstream/secrets/master/keystore.jks"
|
||||||
|
curl -H "Authorization: token ${{ steps.generate_token.outputs.token }}" -o "keystore_password.txt" "https://raw.githubusercontent.com/recloudstream/secrets/master/keystore_password.txt"
|
||||||
|
KEY_PWD="$(cat keystore_password.txt)"
|
||||||
|
echo "::add-mask::${KEY_PWD}"
|
||||||
|
echo "::set-output name=key_pwd::$KEY_PWD""
|
||||||
- name: Run Gradle
|
- name: Run Gradle
|
||||||
run: |
|
run: |
|
||||||
./gradlew assembleDebug
|
./gradlew assemblePrerelease
|
||||||
./gradlew androidSourcesJar
|
./gradlew androidSourcesJar
|
||||||
./gradlew makeJar
|
./gradlew makeJar
|
||||||
# env:
|
env:
|
||||||
# SIGNING_KEY_ALIAS: ${{ secrets.SIGNING_KEY_ALIAS }}
|
SIGNING_KEY_ALIAS: "key0"
|
||||||
# SIGNING_KEY_PASSWORD: ${{ secrets.SIGNING_KEY_PASSWORD }}
|
SIGNING_KEY_PASSWORD: ${{ steps.fetch_keystore.outputs.key_pwd }}
|
||||||
# SIGNING_STORE_PASSWORD: ${{ secrets.SIGNING_STORE_PASSWORD }}
|
SIGNING_STORE_PASSWORD: ${{ steps.fetch_keystore.outputs.key_pwd }}
|
||||||
- name: Create pre-release
|
- name: Create pre-release
|
||||||
uses: "marvinpinto/action-automatic-releases@latest"
|
uses: "marvinpinto/action-automatic-releases@latest"
|
||||||
with:
|
with:
|
||||||
|
@ -55,6 +66,6 @@ jobs:
|
||||||
prerelease: false
|
prerelease: false
|
||||||
title: "Pre-release Build"
|
title: "Pre-release Build"
|
||||||
files: |
|
files: |
|
||||||
app/build/outputs/apk/debug/*.apk
|
app/build/outputs/apk/prerelease/*.apk
|
||||||
app/build/libs/app-sources.jar
|
app/build/libs/app-sources.jar
|
||||||
app/build/classes.jar
|
app/build/classes.jar
|
||||||
|
|
|
@ -58,16 +58,16 @@ android {
|
||||||
// shrinkResources false
|
// shrinkResources false
|
||||||
// proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
// proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||||||
// }
|
// }
|
||||||
// prerelease {
|
prerelease {
|
||||||
// applicationIdSuffix ".prerelease"
|
applicationIdSuffix ".prerelease"
|
||||||
// buildConfigField("boolean", "BETA", "true")
|
buildConfigField("boolean", "BETA", "true")
|
||||||
// signingConfig signingConfigs.prerelease
|
signingConfig signingConfigs.prerelease
|
||||||
// versionNameSuffix '-PRE'
|
versionNameSuffix '-PRE'
|
||||||
// debuggable false
|
debuggable false
|
||||||
// minifyEnabled false
|
minifyEnabled false
|
||||||
// shrinkResources false
|
shrinkResources false
|
||||||
// proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||||||
// }
|
}
|
||||||
debug {
|
debug {
|
||||||
debuggable true
|
debuggable true
|
||||||
applicationIdSuffix ".debug"
|
applicationIdSuffix ".debug"
|
||||||
|
|
Loading…
Reference in a new issue