Skip to content

Commit

Permalink
ADD shared action logic
Browse files Browse the repository at this point in the history
  • Loading branch information
Frank1234 committed Jul 30, 2024
1 parent cfbb692 commit 8cce854
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 36 deletions.
20 changes: 0 additions & 20 deletions .github/workflows/prepare/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ 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: Setup Java
uses: actions/setup-java@v3
with:
Expand All @@ -19,22 +18,3 @@ jobs:

- name: Setup Android SDK
uses: android-actions/[email protected]

- 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
18 changes: 2 additions & 16 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,10 @@ on:
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.
permissions: # TODO still needed?
packages: read
contents: read

steps:
- uses: actions/checkout@v3
- 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]
- name: Prepare build
uses: ./.github/workflows/prepare

- name: Update Version Code # we increase the version code with each build
uses: chkfung/[email protected]
Expand All @@ -47,9 +36,6 @@ jobs:
echo $ENCODED_STRING > keystore-b64.txt
base64 -d <keystore-b64.txt >upload-keystore.jks
# - name: Prepare build
# uses: ./.github/workflows/prepare

- name: Build Release APK
env:
RELEASE_KEYSTORE_PASSWORD: ${{ secrets.RELEASE_KEYSTORE_PASSWORD }}
Expand Down

0 comments on commit 8cce854

Please sign in to comment.