Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add signing configuration and CI workflow #10

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Java CI with Gradle

on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]

jobs:
build:

runs-on: ubuntu-latest
permissions:
contents: read

steps:
- uses: actions/checkout@v4
- name: Set up JDK 8
uses: actions/setup-java@v4
with:
java-version: '8'
distribution: 'temurin'

- name: Setup Android SDK
uses: android-actions/setup-android@v3
with:
cmdline-tools-version: 9123335

- name: Grant execute permission for Gradle wrapper
run: chmod +x ./gradlew

- name: Build with Gradle
run: ./gradlew assembleRelease

- name: Create release.tar.gz archive
run: tar -czvf release.tar.gz -C app/build/outputs/apk/release .

- name: Upload release.tar.gz
uses: actions/upload-artifact@v4
with:
name: release.tar.gz
path: ./release.tar.gz
9 changes: 9 additions & 0 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,17 @@ android {
versionCode 1
versionName "0.1"
}
signingConfigs {
release {
keyAlias 'my-key-alias'
keyPassword 'your-key-password'
storeFile file('my-release-key.jks')
storePassword 'your-keystore-password'
}
}
buildTypes {
release {
signingConfig signingConfigs.release
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
Expand Down
Binary file added app/my-release-key.jks
Binary file not shown.
5 changes: 5 additions & 0 deletions generate-keystore.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash

keytool -genkey -v -keystore my-release-key.jks -keyalg RSA -keysize 2048 -validity 10000 -alias my-key-alias \
-dname "CN=Your Name, OU=Your Organization, O=Your Company, L=Your City, ST=Your State, C=Your Country" \
-storepass your-keystore-password -keypass your-key-password