Skip to content

Fix startup crash on devices running Android 14 #129

Fix startup crash on devices running Android 14

Fix startup crash on devices running Android 14 #129

Workflow file for this run

# This is a basic workflow to help you get started with Actions
name: melonDS Android Nightly Build
# Controls when the action will run.
on:
# Triggers the workflow on push to any branch
push:
branches: [ '**' ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
with:
submodules: recursive
- uses: actions/setup-java@v3
with:
java-version: '17'
distribution: zulu
cache: gradle
- name: Setup Android SDK
uses: android-actions/setup-android@v2
- name: Build melonDS Android
env:
MELONDS_KEYSTORE: ${{ secrets.MELONDS_KEYSTORE }}
MELONDS_KEYSTORE_PASSWORD: ${{ secrets.MELONDS_KEYSTORE_PASSWORD }}
ANDROID_NDK_HOME: ${{ steps.setup-ndk.outputs.ndk-path }}
run: |
COMMIT=$(git rev-parse --short HEAD)
git config user.name "${GITHUB_ACTOR}"
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"
sed -i -e 's/\(versionName = "\)\(.*\)\("\)/\1\2 ('"$COMMIT"')\3/g' buildSrc/src/main/kotlin/AppConfig.kt
echo "$MELONDS_KEYSTORE" | base64 -d > ${{runner.workspace}}/keystore.jks
echo "MELONDS_KEYSTORE=${{runner.workspace}}/keystore.jks" >> local.properties
echo "MELONDS_KEYSTORE_PASSWORD=$MELONDS_KEYSTORE_PASSWORD" >> local.properties
echo "MELONDS_KEY_ALIAS=melonds" >> local.properties
echo "MELONDS_KEY_PASSWORD=$MELONDS_KEYSTORE_PASSWORD" >> local.properties
chmod +x ./gradlew
./gradlew :app:assembleGitHubNightlyRelease
git tag -m "Nightly Release" -f -a nightly-release
git push -f origin refs/tags/nightly-release
- name: Update GitHub Nightly Release
id: update_release
uses: ncipollo/release-action@v1
with:
allowUpdates: true
prerelease: true
token: ${{ secrets.GITHUB_TOKEN }}
tag: nightly-release
name: 'Nightly Build'
body: 'The currently Nightly Build. Whenever new changes are pushed, you can find the latest build here. You can keep this installation alongside your main one.'
artifacts: app/build/outputs/apk/gitHubNightly/release/app-gitHub-nightly-release.apk
artifactContentType: application/vnd.android.package-archive
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: melonDS-android
path: app/build/outputs/apk/gitHubNightly/release/app-gitHub-nightly-release.apk