Skip to content

Commit

Permalink
CHANGE CI action fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Frank1234 committed Aug 8, 2024
1 parent 586c0b3 commit c0cd462
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 55 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/_prepareAll.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Prepare All

on:
workflow_call:

jobs:
prepareAll:
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:
- 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]
8 changes: 4 additions & 4 deletions .github/workflows/_prepareRelease.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Prepare release
name: Prepare Release

on:
workflow_call:
Expand All @@ -13,15 +13,15 @@ on:
required: true

jobs:
prepare:
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:
- 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
Expand All @@ -30,7 +30,7 @@ jobs:
RELEASE_KEYSTORE_PASSWORD: "${{ secrets.RELEASE_KEYSTORE_PASSWORD }}"
RELEASE_KEYSTORE_ALIAS: "${{ secrets.RELEASE_KEYSTORE_ALIAS }}"
RELEASE_KEY_PASSWORD: "${{ secrets.RELEASE_KEY_PASSWORD }}"

shell: bash
run: |
echo $ENCODED_STRING > keystore-b64.txt
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/debug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@ name: Debug Builds
on: [ push ] # run on all pushes on any branch

jobs:
prepareAll:
uses: ./.github/workflows/_prepareAll.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@v3
- name: Prepare build
uses: ./.github/workflows/scripts/prepare

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

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

- name: Upload Dev Debug APK to Artifacts
Expand Down
9 changes: 4 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,15 @@ on:
branches: [ '*' ] # run on all pull requests

jobs:
prepareAll:
uses: ./.github/workflows/_prepareAll.yml
prepareRelease:
uses: ./.github/workflows/_prepareRelease.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@v3

- name: Prepare build
uses: ./.github/workflows/scripts/prepare

- name: Prepare release build
uses: ./.github/workflows/scripts/prepare_release
env:
RELEASE_KEYSTORE_PASSWORD: "${{ secrets.RELEASE_KEYSTORE_PASSWORD }}"
RELEASE_KEYSTORE_ALIAS: "${{ secrets.RELEASE_KEYSTORE_ALIAS }}"
Expand Down
16 changes: 0 additions & 16 deletions .github/workflows/scripts/prepare/action.yml

This file was deleted.

27 changes: 0 additions & 27 deletions .github/workflows/scripts/prepare_release/action.yml

This file was deleted.

0 comments on commit c0cd462

Please sign in to comment.