Skip to content

Commit

Permalink
Merge remote-tracking branch 'refs/remotes/origin/main' into request-…
Browse files Browse the repository at this point in the history
…contributions

# Conflicts:
#	README.MD
  • Loading branch information
ninovanhooff committed Sep 6, 2024
2 parents 4ecec68 + 417ee4c commit 03912ec
Show file tree
Hide file tree
Showing 32 changed files with 563 additions and 438 deletions.
2 changes: 1 addition & 1 deletion .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
## Why is this important?

## Any review notes?
## Notes
19 changes: 19 additions & 0 deletions .github/workflows/_prepare-all.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Prepare All

on:
workflow_call:

jobs:
prepare-all:
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@v4

- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: "corretto"
java-version: "21" # keep the same as your Android Studio version

- name: Setup Android SDK
uses: android-actions/setup-android@v3
16 changes: 16 additions & 0 deletions .github/workflows/_prepare-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Prepare Release

on:
workflow_call:

jobs:
prepareRelease:
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@v4

- 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 }}
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 Builds

on: [ push ] # run on all pushes on any branch

jobs:
prepare-all:
uses: ./.github/workflows/_prepare-all.yml
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@v4

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

- name: Run unit tests
run: ./gradlew test --stacktrace

- name: Upload Dev Debug APK to Artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ github.event.repository.name }}-${{ github.run_number }}-dev-debug-apk
path: |
${{ github.workspace }}/app/build/outputs/apk/dev/debug/app-dev-debug.apk
- name: Build Prod APK
run: ./gradlew assembleProdDebug --stacktrace

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

This file was deleted.

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

on:
workflow_dispatch:
pull_request:
branches: [ 'develop' ]

jobs:
prepare-all:
uses: ./.github/workflows/_prepare-all.yml
prepare-release:
uses: ./.github/workflows/_prepare-release.yml
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@v4

# 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 }}
shell: bash
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@v4
with:
name: ${{ github.event.repository.name }}-${{ github.run_number }}-prod-release-apk
path: |
${{ github.workspace }}/app/build/outputs/apk/prod/release/app-prod-release.apk
- name: Upload Prod Release APK to Firebase App Distribution
uses: nickwph/firebase-app-distribution-action@v1
with:
file: ${{ github.workspace }}/app/build/outputs/apk/prod/release/app-prod-release.apk
app: ${{ secrets.FIREBASE_PROD_APP_ID }}
credentials: ${{ secrets.FIREBASE_CREDENTIALS }}

- 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@v4
with:
name: ${{ github.event.repository.name }}-${{ github.run_number }}-prod-release-bundle
path: |
${{ github.workspace }}/app/build/outputs/bundle/prodRelease/app-prod-release.aab
40 changes: 40 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Release Builds

on:
workflow_dispatch:
pull_request:
branches: [ '*' ] # run on all pull requests

jobs:
prepare-all:
uses: ./.github/workflows/_prepare-all.yml
prepare-release:
uses: ./.github/workflows/_prepare-release.yml
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@v4

# 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 }}
shell: bash
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@v4
with:
name: ${{ github.event.repository.name }}-${{ github.run_number }}-prod-release-apk
path: |
${{ github.workspace }}/app/build/outputs/apk/prod/release/app-prod-release.apk
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

0 comments on commit 03912ec

Please sign in to comment.