Skip to content

Commit

Permalink
Merge pull request #5 from gohj99/develop
Browse files Browse the repository at this point in the history
Develop to Master
  • Loading branch information
gohj99 authored Oct 2, 2024
2 parents 3524f43 + c1400f8 commit 4f863e4
Show file tree
Hide file tree
Showing 40 changed files with 640 additions and 350 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/app-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
- uses: gradle/gradle-build-action@v3
with:
gradle-version: 8.6
gradle-version: 8.9
arguments: assembleRelease

- name: Sign ARM APK
Expand Down Expand Up @@ -110,4 +110,4 @@ jobs:
token: ${{ github.token }}
generateReleaseNotes: true
tag: v${{ env.VERSION_NAME }}-${{ github.run_number }}
prerelease: true
prerelease: false
122 changes: 122 additions & 0 deletions .github/workflows/app-dev-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
name: Android Build

on:
pull_request:
branches:
- master
- develop

workflow_dispatch:
push:
branches:
- develop

jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4

- name: Extract repository name
id: repo-name
run: echo "REPO_NAME=$(echo ${{ github.repository }} | cut -d'/' -f2)" >> $GITHUB_ENV

- name: Extract version name
id: version_name
run: |
VERSION_NAME=$(grep -oP 'versionName\s*=\s*"\K[^"]+' ./app/build.gradle.kts)
echo "VERSION_NAME=$VERSION_NAME" >> $GITHUB_ENV
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 17

- name: Setup Android SDK
uses: android-actions/setup-android@v3

- name: Install Android Build Tools
run: sdkmanager "build-tools;29.0.3"

- name: Extract formatted build date
run: echo "BUILD_DATE=$(date -u '+%Y%m%d%H')" >> $GITHUB_ENV

- name: Inject Secrets into config.properties
run: |
echo "api_id=${{ secrets.API_ID }}" > app/src/main/assets/config.properties
echo "api_hash=${{ secrets.API_HASH }}" >> app/src/main/assets/config.properties
echo "BUILD_DATE=${{ env.BUILD_DATE }}" >> app/src/main/assets/config.properties
- uses: gradle/gradle-build-action@v3
with:
gradle-version: 8.9
arguments: assembleRelease

- name: Sign ARM APK
uses: r0adkll/sign-android-release@v1
with:
releaseDirectory: app/build/outputs/apk/arm/release
signingKeyBase64: ${{ secrets.SIGNING_KEY }}
alias: ${{ secrets.ALIAS }}
keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }}
keyPassword: ${{ secrets.KEY_PASSWORD }}
- name: Move ARM APK
run: mv app/build/outputs/apk/arm/release/app-arm-release-unsigned-signed.apk ${{ env.REPO_NAME }}-v${{ env.VERSION_NAME }}-arm.apk

- name: Sign ARM64 APK
uses: r0adkll/sign-android-release@v1
with:
releaseDirectory: app/build/outputs/apk/arm64/release
signingKeyBase64: ${{ secrets.SIGNING_KEY }}
alias: ${{ secrets.ALIAS }}
keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }}
keyPassword: ${{ secrets.KEY_PASSWORD }}
- name: Move ARM64 APK
run: mv app/build/outputs/apk/arm64/release/app-arm64-release-unsigned-signed.apk ${{ env.REPO_NAME }}-v${{ env.VERSION_NAME }}-arm64.apk

- name: Sign X86 APK
uses: r0adkll/sign-android-release@v1
with:
releaseDirectory: app/build/outputs/apk/x86/release
signingKeyBase64: ${{ secrets.SIGNING_KEY }}
alias: ${{ secrets.ALIAS }}
keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }}
keyPassword: ${{ secrets.KEY_PASSWORD }}
- name: Move X86 APK
run: mv app/build/outputs/apk/x86/release/app-x86-release-unsigned-signed.apk ${{ env.REPO_NAME }}-v${{ env.VERSION_NAME }}-x86.apk

- name: Sign x86_64 APK
uses: r0adkll/sign-android-release@v1
with:
releaseDirectory: app/build/outputs/apk/x86_64/release
signingKeyBase64: ${{ secrets.SIGNING_KEY }}
alias: ${{ secrets.ALIAS }}
keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }}
keyPassword: ${{ secrets.KEY_PASSWORD }}
- name: Move x86_64 APK
run: mv app/build/outputs/apk/x86_64/release/app-x86_64-release-unsigned-signed.apk ${{ env.REPO_NAME }}-v${{ env.VERSION_NAME }}-x86_64.apk

- name: Sign Universal APK
uses: r0adkll/sign-android-release@v1
with:
releaseDirectory: app/build/outputs/apk/universal/release
signingKeyBase64: ${{ secrets.SIGNING_KEY }}
alias: ${{ secrets.ALIAS }}
keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }}
keyPassword: ${{ secrets.KEY_PASSWORD }}
- name: Move Universal APK
run: mv app/build/outputs/apk/universal/release/app-universal-release-unsigned-signed.apk ${{ env.REPO_NAME }}-v${{ env.VERSION_NAME }}-universal.apk

- name: Upload APKs as artifact
uses: actions/upload-artifact@v3
with:
name: android-build-apks
path: |
${{ env.REPO_NAME }}-v${{ env.VERSION_NAME }}-arm.apk
${{ env.REPO_NAME }}-v${{ env.VERSION_NAME }}-arm64.apk
${{ env.REPO_NAME }}-v${{ env.VERSION_NAME }}-x86.apk
${{ env.REPO_NAME }}-v${{ env.VERSION_NAME }}-x86_64.apk
${{ env.REPO_NAME }}-v${{ env.VERSION_NAME }}-universal.apk
retention-days: 30
8 changes: 4 additions & 4 deletions .idea/appInsightsSettings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/compiler.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 12 additions & 1 deletion .idea/deploymentTargetSelector.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions .idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

32 changes: 32 additions & 0 deletions .idea/inspectionProfiles/Project_Default.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 8 additions & 1 deletion .idea/kotlinc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 4f863e4

Please sign in to comment.