2021-08-16 10:27:45 +00:00
|
|
|
name: Pre-release
|
2021-08-16 09:51:31 +00:00
|
|
|
|
2021-08-17 07:42:28 +00:00
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches: [ master ]
|
2021-08-18 11:44:16 +00:00
|
|
|
paths-ignore:
|
|
|
|
- '*.md'
|
2022-03-18 09:02:18 +00:00
|
|
|
- '*.json'
|
2022-05-28 14:56:07 +00:00
|
|
|
- '**/wcokey.txt'
|
2021-08-16 09:51:31 +00:00
|
|
|
|
2021-08-16 10:37:32 +00:00
|
|
|
concurrency:
|
2021-08-19 22:13:10 +00:00
|
|
|
group: "pre-release"
|
2021-08-16 10:37:32 +00:00
|
|
|
cancel-in-progress: true
|
|
|
|
|
2021-08-16 09:51:31 +00:00
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
2021-10-07 17:40:31 +00:00
|
|
|
- name: Set up JDK 11
|
2021-08-17 07:42:28 +00:00
|
|
|
uses: actions/setup-java@v2
|
2021-08-16 09:51:31 +00:00
|
|
|
with:
|
2021-10-07 17:40:31 +00:00
|
|
|
java-version: '11'
|
2021-08-17 07:42:28 +00:00
|
|
|
distribution: 'adopt'
|
|
|
|
- name: Grant execute permission for gradlew
|
|
|
|
run: chmod +x gradlew
|
2021-08-22 17:55:15 +00:00
|
|
|
- name: Set checks for prerelease updates to true by default
|
|
|
|
run: |
|
|
|
|
sed -i "s/R\.string\.prerelease_update_key), false))/R\.string\.prerelease_update_key), true))/" app/src/main/java/com/lagradost/cloudstream3/utils/InAppUpdater.kt
|
2021-08-17 14:13:48 +00:00
|
|
|
- name: Update prerelease_commit_hash
|
|
|
|
run: |
|
|
|
|
COMMIT_HASH="$(git log -1 --format='%H')"
|
2021-09-05 08:20:08 +00:00
|
|
|
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
|
2022-08-04 08:48:52 +00:00
|
|
|
# - 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.keystore
|
2021-08-17 07:42:28 +00:00
|
|
|
- name: Run Gradle
|
2022-08-05 15:55:29 +00:00
|
|
|
run: |
|
2022-08-06 08:13:21 +00:00
|
|
|
./gradlew assembleDebug
|
|
|
|
./gradlew androidSourcesJar
|
|
|
|
./gradlew makeJar
|
2022-08-04 08:50:09 +00:00
|
|
|
# env:
|
|
|
|
# SIGNING_KEY_ALIAS: ${{ secrets.SIGNING_KEY_ALIAS }}
|
|
|
|
# SIGNING_KEY_PASSWORD: ${{ secrets.SIGNING_KEY_PASSWORD }}
|
|
|
|
# SIGNING_STORE_PASSWORD: ${{ secrets.SIGNING_STORE_PASSWORD }}
|
2022-08-04 08:48:52 +00:00
|
|
|
- name: Create pre-release
|
2022-08-04 08:50:09 +00:00
|
|
|
uses: "marvinpinto/action-automatic-releases@latest"
|
|
|
|
with:
|
|
|
|
repo_token: "${{ secrets.GITHUB_TOKEN }}"
|
|
|
|
automatic_release_tag: "pre-release"
|
2022-08-10 09:29:28 +00:00
|
|
|
prerelease: false
|
2022-08-04 08:50:09 +00:00
|
|
|
title: "Pre-release Build"
|
|
|
|
files: |
|
2022-08-04 08:57:45 +00:00
|
|
|
app/build/outputs/apk/debug/*.apk
|
2022-08-05 15:55:29 +00:00
|
|
|
app/build/libs/app-sources.jar
|
2022-08-06 08:13:21 +00:00
|
|
|
app/build/classes.jar
|