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

CI / Guthub actions v2 #65

Merged
merged 33 commits into from
Jul 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
2577a57
ADD github actions v2
Frank1234 Jul 30, 2024
8cbab85
CHANGE prepare build step
Frank1234 Jul 30, 2024
76aac41
CHANGE remove empty workflow
Frank1234 Jul 30, 2024
493ecd8
CHANGE trigger action changes
Frank1234 Jul 30, 2024
887a894
CHANGE trigger action changes
Frank1234 Jul 30, 2024
dce5f14
CHANGE trigger action changes
Frank1234 Jul 30, 2024
e1fd5fe
Merge remote-tracking branch 'origin/main' into guthub-actions-v2
Frank1234 Jul 30, 2024
38ac35c
CHANGE trigger action changes
Frank1234 Jul 30, 2024
074673b
CHANGE trigger action changes
Frank1234 Jul 30, 2024
a80151f
CHANGE trigger action changes
Frank1234 Jul 30, 2024
ac5c2ae
CHANGE trigger action changes
Frank1234 Jul 30, 2024
58f0533
CHANGE trigger action changes
Frank1234 Jul 30, 2024
3345d4a
CHANGE trigger action changes
Frank1234 Jul 30, 2024
6b0f99c
CHANGE trigger action changes
Frank1234 Jul 30, 2024
61fb4be
CHANGE key setup
Frank1234 Jul 30, 2024
ad073a8
CHANGE key setup
Frank1234 Jul 30, 2024
077fac9
CHANGE key setup
Frank1234 Jul 30, 2024
9bf07f8
CHANGE key setup
Frank1234 Jul 30, 2024
5ffee8e
CHANGE key setup
Frank1234 Jul 30, 2024
13d2268
CHANGE dependency change to fix build error
Frank1234 Jul 30, 2024
af819e4
CHANGE dependency change to fix build error
Frank1234 Jul 30, 2024
a06d8fc
ADD debug build workflow
Frank1234 Jul 30, 2024
345f9d6
ADD debug build workflow
Frank1234 Jul 30, 2024
df17666
ADD debug build workflow
Frank1234 Jul 30, 2024
8fa5db9
ADD debug build workflow
Frank1234 Jul 30, 2024
078f151
ADD debug build workflow
Frank1234 Jul 30, 2024
682f6ba
ADD action yml
Frank1234 Jul 30, 2024
cfbb692
ADD action yml
Frank1234 Jul 30, 2024
8cce854
ADD shared action logic
Frank1234 Jul 30, 2024
4ab5a54
ADD shared action logic
Frank1234 Jul 30, 2024
538318c
ADD shared action logic
Frank1234 Jul 30, 2024
143137a
CHANGE build tweaks
Frank1234 Jul 31, 2024
36c8586
CHANGE build tweaks
Frank1234 Jul 31, 2024
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
34 changes: 34 additions & 0 deletions .github/workflows/debug.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Debug Build

on:
workflow_dispatch:
push:
branches: [ '*' ] # run on all pushes on any branch

jobs:
build:
runs-on: macos-latest # use [ self-hosted, macOS ] to host on our own mac mini, which is twice as fast and cheaper than hosting on a github runner. See README for more info.
steps:
- uses: actions/checkout@v3
- name: Prepare build
uses: ./.github/workflows/scripts/prepare

- name: Build Debug APK
run: ./gradlew assembleDevDebug --stacktrace

- name: Upload Dev Debug APK to Artifacts
uses: actions/upload-artifact@v3
with:
name: ${{ github.run_number }}_apk_dev_debug
path: |
${{ github.workspace }}/app/build/outputs/apk/devDebug/app-dev-debug.apk

- name: Build Prod APK
run: ./gradlew assembleProdDebug --stacktrace

- name: Upload Prod Debug APK to Artifacts
uses: actions/upload-artifact@v3
with:
name: ${{ github.run_number }}_apk_prod_debug
path: |
${{ github.workspace }}/app/build/outputs/apk/prodDebug/app-prod-debug.apk
43 changes: 0 additions & 43 deletions .github/workflows/pr.yml

This file was deleted.

65 changes: 65 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: Release Build

on:
workflow_dispatch:
inputs:
name:
description: "Release-Build"
default: "Generate release build"
pull_request:
branches: [ '*' ] # run on all pull requests

jobs:
build:
runs-on: macos-latest # use [ self-hosted, macOS ] to host on our own mac mini, which is twice as fast and cheaper than hosting on a github runner. See README for more info.
steps:
- uses: actions/checkout@v3
- name: Prepare build
uses: ./.github/workflows/scripts/prepare

- name: Update Version Code # we increase the version code with each build
uses: chkfung/[email protected]
with:
gradlePath: app/build.gradle
versionCode: ${{ github.run_number }}

# This will decode the keystore from base 64 text representation that we have stored in secrets
# and generates and keystore file and gets stored in /android-app path
- name: Decode Keystore
env:
ENCODED_STRING: ${{ secrets.KEYSTORE_BASE_64 }}
RELEASE_KEYSTORE_PASSWORD: ${{ secrets.RELEASE_KEYSTORE_PASSWORD }}
RELEASE_KEYSTORE_ALIAS: ${{ secrets.RELEASE_KEYSTORE_ALIAS }}
RELEASE_KEY_PASSWORD: ${{ secrets.RELEASE_KEY_PASSWORD }}

run: |
echo $ENCODED_STRING > keystore-b64.txt
base64 -d <keystore-b64.txt >upload-keystore.jks

- name: Build Prod Release APK
env:
RELEASE_KEYSTORE_PASSWORD: ${{ secrets.RELEASE_KEYSTORE_PASSWORD }}
RELEASE_KEYSTORE_ALIAS: ${{ secrets.RELEASE_KEYSTORE_ALIAS }}
RELEASE_KEY_PASSWORD: ${{ secrets.RELEASE_KEY_PASSWORD }}
run: ./gradlew assembleProdRelease --stacktrace

- name: Upload Release APK to Artifacts
uses: actions/upload-artifact@v3
with:
name: ${{ github.run_number }}_apk_debug
path: |
${{ github.workspace }}/app/build/outputs/apk/prodRelease/app-prod-release.apk

- name: Build Prod Release Bundle
env:
RELEASE_KEYSTORE_PASSWORD: ${{ secrets.RELEASE_KEYSTORE_PASSWORD }}
RELEASE_KEYSTORE_ALIAS: ${{ secrets.RELEASE_KEYSTORE_ALIAS }}
RELEASE_KEY_PASSWORD: ${{ secrets.RELEASE_KEY_PASSWORD }}
run: ./gradlew bundleProdRelease --stacktrace

- name: Upload Release Bundle to Artifacts
uses: actions/upload-artifact@v3
with:
name: ${{ github.run_number }}_apk_debug
path: |
${{ github.workspace }}/app/build/outputs/bundle/prodRelease/app-prod-release.aab
14 changes: 14 additions & 0 deletions .github/workflows/scripts/prepare/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Preparation

runs:
using: "composite"
steps:
- name: Setup Java
uses: actions/setup-java@v3
with:
distribution: "corretto"
java-version: "21" # keep the same as your Android Studio version
cache: "gradle"

- name: Setup Android SDK
uses: android-actions/[email protected]
10 changes: 10 additions & 0 deletions .idea/deploymentTargetSelector.xml

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

Loading
Loading