Geckoview updated to version 127. #11
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and Release | |
on: | |
push: | |
branches: | |
- master | |
tags: | |
- "v*" | |
jobs: | |
apk: | |
name: Generate APK | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Checkout submodules | |
uses: actions/checkout@v4 | |
with: | |
repository: manfred-mueller/signing | |
token: ${{ secrets.ACCESS_TOKEN }} | |
path: keystore | |
- name: Setup JDK | |
uses: actions/setup-java@v4 | |
with: | |
distribution: temurin | |
java-version: "11" | |
- name: Copy Gradle Properties | |
run: | | |
mkdir -p $HOME/.gradle | |
cp keystore/gradle.properties $HOME/.gradle/gradle.properties | |
- name: Set execution flag for gradlew | |
run: chmod +x gradlew | |
- name: Build APK | |
run: bash ./gradlew assembleRelease --stacktrace | |
- name: Get Application Name | |
run: | | |
appName=`grep " applicationId" app/build.gradle | cut -d'"' -f2 | cut -d'.' -f4` | |
export APP_NAME=$appName | |
echo "APP_NAME=$appName" >> $GITHUB_ENV | |
id: android_app_name | |
- name: Get Version Name | |
run: | | |
versionName=`grep " verName" build.gradle | cut -d'"' -f2` | |
export VERSION_NAME=$versionName | |
echo "VERSION_NAME=$versionName" >> $GITHUB_ENV | |
id: android_version_name | |
- name: Get Version Code | |
run: | | |
versionCode=`grep " verCode" build.gradle | awk '{ print $3; }'` | |
export VERSION_CODE=$versionCode | |
echo "VERSION_CODE=$versionCode" >> $GITHUB_ENV | |
find app/build/outputs/apk/release -name "*.apk" -type f | |
id: android_version_code | |
- name: Find APK_PATH | |
run: | | |
apk_path=`find app/build/outputs/apk/release -name "*.apk" -type f` | |
export APK_PATH=$apk_path | |
echo "APK_PATH=$apk_path" >> $GITHUB_ENV | |
find app/build/outputs/apk/release -name "*.apk" -type f | |
id: find_apk_path | |
- name: Upload APK | |
uses: actions/upload-artifact@v4 | |
with: | |
name: apk | |
path: ${{ env.APK_PATH }} | |
release: | |
name: Release APK | |
needs: apk | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Get Application Name | |
run: | | |
appName=`grep " applicationId" app/build.gradle | cut -d'"' -f2 | cut -d'.' -f4` | |
export APP_NAME=$appName | |
echo "APP_NAME=$appName" >> $GITHUB_ENV | |
id: android_app_name | |
- name: Get Version Name | |
run: | | |
versionName=`grep " verName" build.gradle | cut -d'"' -f2` | |
export VERSION_NAME=$versionName | |
echo "VERSION_NAME=$versionName" >> $GITHUB_ENV | |
id: android_version_name | |
- name: Get Version Code | |
run: | | |
versionCode=`grep " verCode" build.gradle | awk '{ print $3; }'` | |
export VERSION_CODE=$versionCode | |
echo "VERSION_CODE=$versionCode" >> $GITHUB_ENV | |
id: android_version_code | |
- name: Download APK from build | |
uses: actions/download-artifact@v4 | |
with: | |
name: apk | |
- name: Find APK | |
run: | | |
find . -name "*.apk" -type f | |
id: find_apk | |
- name: Find APK_PATH | |
run: | | |
apkPath=$(find . -name "*.apk" -type f) | |
export APK_PATH=$apkPath | |
echo "APK_PATH=$apkPath" >> $GITHUB_ENV | |
id: find_apk_path | |
- name: Upload binaries to release | |
uses: svenstaro/upload-release-action@v2 | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
file: ${{ env.APK_PATH }} | |
asset_name: ${{ env.APP_NAME }}-${{ env.VERSION_NAME }}-release.apk | |
tag: v${{ env.VERSION_NAME }} | |
overwrite: true | |
body: ${{ github.event.workflow_run.head_commit.message }} | |