mirror of
https://github.com/rafaelvcaetano/melonDS-android.git
synced 2025-04-02 09:11:37 +00:00
Initial CI setup
This commit is contained in:
parent
2b4b66fc8c
commit
1ba821651f
57
.github/workflows/main.yaml
vendored
Normal file
57
.github/workflows/main.yaml
vendored
Normal file
@ -0,0 +1,57 @@
|
||||
# This is a basic workflow to help you get started with Actions
|
||||
|
||||
name: melonDS Android Build
|
||||
|
||||
# Controls when the action will run.
|
||||
on:
|
||||
# Triggers the workflow on push or pull request events but only for the master branch
|
||||
push:
|
||||
branches: [ master ]
|
||||
|
||||
# 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@v2
|
||||
with:
|
||||
submodules: true
|
||||
|
||||
- uses: actions/setup-java@v1
|
||||
with:
|
||||
java-version: '8'
|
||||
|
||||
- name: Setup Android SDK
|
||||
uses: android-actions/setup-android@v2
|
||||
|
||||
- name: Setup Android NDK
|
||||
uses: nttld/setup-ndk@v1.0.5
|
||||
with:
|
||||
ndk-version: r21d
|
||||
|
||||
- name: Build melonDS Android
|
||||
run: |
|
||||
echo ${{secrets.MELONDS_KEYSTORE}} | base64 -d > keystore.jks
|
||||
echo MELONDS_KEYSTORE=${{runner.workspace}}/keystore.jks >> local.properties
|
||||
echo MELONDS_KEYSTORE_PASSWORD=${{secrets.MELONDS_KEYSTORE_PASSWORD}} >> local.properties
|
||||
echo MELONDS_KEY_ALIAS=melonds >> local.properties
|
||||
echo MELONDS_KEY_PASSWORD=${{secrets.MELONDS_KEYSTORE_PASSWORD}} >> local.properties
|
||||
chmod +x ./gradlew
|
||||
./gradlew assembleGitHubRelease
|
||||
env:
|
||||
ANDROID_NDK_HOME: ${{ steps.setup-ndk.outputs.ndk-path }}
|
||||
|
||||
- name: Generate Artifact
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: melonDS-android
|
||||
path: ${{runner.workspace}}/app/build/outputs/apk/gitHub/release/*.apk
|
@ -1,3 +1,5 @@
|
||||
import com.android.build.gradle.internal.cxx.configure.gradleLocalProperties
|
||||
|
||||
plugins {
|
||||
id("com.android.application")
|
||||
id("kotlin-android")
|
||||
@ -7,6 +9,16 @@ plugins {
|
||||
}
|
||||
|
||||
android {
|
||||
signingConfigs {
|
||||
create("release") {
|
||||
val props = gradleLocalProperties(rootDir)
|
||||
storeFile = file(props["MELONDS_KEYSTORE"] as String)
|
||||
storePassword = props["MELONDS_KEYSTORE_PASSWORD"] as String
|
||||
keyAlias = props["MELONDS_KEY_ALIAS"] as String
|
||||
keyPassword = props["MELONDS_KEY_PASSWORD"] as String
|
||||
}
|
||||
}
|
||||
|
||||
compileSdkVersion(AppConfig.compileSdkVersion)
|
||||
ndkVersion = AppConfig.ndkVersion
|
||||
defaultConfig {
|
||||
@ -34,6 +46,7 @@ android {
|
||||
getByName("release") {
|
||||
isMinifyEnabled = true
|
||||
proguardFiles(getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro")
|
||||
signingConfig = signingConfigs.getByName("release")
|
||||
}
|
||||
getByName("debug") {
|
||||
applicationIdSuffix = ".dev"
|
||||
|
1
buildSrc/.gitignore
vendored
Normal file
1
buildSrc/.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
/build
|
Loading…
x
Reference in New Issue
Block a user