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:
|
2022-08-15 10:04:04 +00:00
|
|
|
- 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"
|
2021-08-16 09:51:31 +00:00
|
|
|
- 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
|
2022-08-15 10:04:04 +00:00
|
|
|
- name: Fetch keystore
|
|
|
|
id: fetch_keystore
|
|
|
|
run: |
|
|
|
|
TMP_KEYSTORE_FILE_PATH="${RUNNER_TEMP}"/keystore
|
|
|
|
mkdir -p "${TMP_KEYSTORE_FILE_PATH}"
|
|
|
|
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}"
|
2022-10-26 20:06:19 +00:00
|
|
|
echo "key_pwd=$KEY_PWD" >> $GITHUB_OUTPUT
|
2021-08-17 07:42:28 +00:00
|
|
|
- name: Run Gradle
|
2022-08-05 15:55:29 +00:00
|
|
|
run: |
|
2022-10-26 20:39:36 +00:00
|
|
|
./gradlew assemblePrerelease makeJar androidSourcesJar
|
2022-08-15 10:04:04 +00:00
|
|
|
env:
|
|
|
|
SIGNING_KEY_ALIAS: "key0"
|
|
|
|
SIGNING_KEY_PASSWORD: ${{ steps.fetch_keystore.outputs.key_pwd }}
|
|
|
|
SIGNING_STORE_PASSWORD: ${{ steps.fetch_keystore.outputs.key_pwd }}
|
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-09-07 06:33:04 +00:00
|
|
|
prerelease: true
|
2022-08-04 08:50:09 +00:00
|
|
|
title: "Pre-release Build"
|
|
|
|
files: |
|
2022-10-26 19:56:31 +00:00
|
|
|
app/build/outputs/apk/prerelease/stable/*.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
|