Skip to content

Release Beta 1.9.1

Release Beta 1.9.1 #7

Workflow file for this run

name: melonDS Android Release
on:
# Trigger action when a tag is pushed
push:
tags:
- '*'
- '!nightly-release'
jobs:
github-release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- uses: actions/setup-java@v3
with:
java-version: '17'
distribution: zulu
- 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: |
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:assembleGitHubProdRelease
- name: Get Tag and Version
id: release_params
run: |
echo TAG=${GITHUB_REF/refs\/tags\//} >> $GITHUB_OUTPUT
echo VERSION=$(grep -oP 'versionName = "\K(.*?)(?=")' buildSrc/src/main/kotlin/AppConfig.kt) >> $GITHUB_OUTPUT
- name: Create GitHub Release
id: create_release
uses: ncipollo/release-action@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ steps.release_params.outputs.TAG }}
name: ${{ steps.release_params.outputs.VERSION }}
bodyFile: ./.github/changelog/gitHub.md
artifacts: app/build/outputs/apk/gitHubProd/release/app-gitHub-prod-release.apk
artifactContentType: application/vnd.android.package-archive
- name: Upload APK, Mapping and Debug Symbols
uses: actions/upload-artifact@v3
with:
name: github-release
path: |
app/build/outputs/apk/gitHubProd/release/app-gitHub-prod-release.apk
app/build/outputs/mapping/gitHubProdRelease/mapping.txt
app/build/outputs/native-debug-symbols/gitHubProdRelease/native-debug-symbols.zip
playstore-release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- uses: actions/setup-java@v3
with:
java-version: '17'
distribution: zulu
- 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 }}
MELONDS_KEY_PASSWORD: ${{ secrets.MELONDS_KEYSTORE_PLAYSTORE_PASSWORD }}
ANDROID_NDK_HOME: ${{ steps.setup-ndk.outputs.ndk-path }}
run: |
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-playstore" >> local.properties
echo "MELONDS_KEY_PASSWORD=$MELONDS_KEY_PASSWORD" >> local.properties
chmod +x ./gradlew
./gradlew :app:assemblePlayStoreProdRelease
- name: Get Version
id: release_params
run: echo VERSION=$(grep -oP 'versionName = "\K(.*?)(?=")' buildSrc/src/main/kotlin/AppConfig.kt) >> $GITHUB_OUTPUT
- name: Create Play Store Release
uses: r0adkll/[email protected]
with:
serviceAccountJsonPlainText: ${{ secrets.MELONDS_PLAYSTORE_ACCOUNT_JSON }}
packageName: me.magnum.melonds
releaseName: ${{ steps.release_params.outputs.VERSION }}
releaseFiles: app/build/outputs/apk/playStoreProd/release/app-playStore-prod-release.apk
track: beta
inAppUpdatePriority: 2
status: draft
whatsNewDirectory: ./.github/changelog/playStore
mappingFile: app/build/outputs/mapping/playStoreProdRelease/mapping.txt
debugSymbols: app/build/outputs/native-debug-symbols/playStoreProdRelease/native-debug-symbols.zip
- name: Upload APK, Mapping and Debug Symbols
uses: actions/upload-artifact@v3
with:
name: playstore-release
path: |
app/build/outputs/apk/playStoreProd/release/app-playStore-prod-release.apk
app/build/outputs/mapping/playStoreProdRelease/mapping.txt
app/build/outputs/native-debug-symbols/playStoreProdRelease/native-debug-symbols.zip