Skip to content

feat: Add reset functionality to app renaming #2497

feat: Add reset functionality to app renaming

feat: Add reset functionality to app renaming #2497

# Builds the project, signs an API, and then uploads it
name: Android Main Branch CI
on:
push:
branches:
- 'main'
workflow_dispatch:
jobs:
build:
name: Build, Sign & Upload
runs-on: ubuntu-latest
steps:
- name: Checkout project
uses: actions/[email protected]
with:
token: ${{ github.actor == 'dependabot[bot]' && secrets.GITHUB_TOKEN || secrets.GIT_BOT_TOKEN }}
ref: main
- name: set up JDK 17
uses: actions/[email protected]
with:
java-version: '17'
distribution: 'temurin'
cache: gradle
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Stop Gradle daemons
run: ./gradlew --stop
- name: Decode keystore
id: write_base64_file
shell: bash
run: |
echo "${{ secrets.SIGNINGKEY_BASE64 }}" > mLauncher.jks.tmp
base64 -d -i mLauncher.jks.tmp > mLauncher.jks
rm mLauncher.jks.tmp
mkdir -p app
mv mLauncher.jks app/
DESTINATION_FILE="app/mLauncher.jks"
echo "filePath=$DESTINATION_FILE" >> "$GITHUB_OUTPUT"
echo "Keystore written to $DESTINATION_FILE"
- name: Build with Gradle
run: ./gradlew clean assembleProdRelease --refresh-dependencies --no-daemon
env:
JAVA_TOOL_OPTIONS: "-Dhttps.protocols=TLSv1.2"
KEY_STORE_FILE: ${{ steps.write_base64_file.outputs.filePath }}
KEY_STORE_PASSWORD: ${{ secrets.KEY_STORE_PASSWORD }}
KEY_ALIAS: ${{ secrets.KEY_ALIAS }}
KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }}
- name: Secure keystore cleanup
if: always()
shell: bash
run: |
shred -u app/mLauncher.jks || rm -f app/mLauncher.jks