Skip to content

Commit

Permalink
Merge pull request #634 from Adamant-im/fix/capacitor
Browse files Browse the repository at this point in the history
Fix/capacitor
  • Loading branch information
bludnic authored Jun 19, 2024
2 parents 9789ebf + 8b67dce commit 5cf9763
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 14 deletions.
24 changes: 13 additions & 11 deletions .github/workflows/capacitor-android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,26 +13,29 @@ env:
ANDROID_KEYSTORE_PASSWORD: ${{ secrets.ANDROID_KEYSTORE_PASSWORD }}
ANDROID_KEYSTORE_ALIAS: ${{ secrets.ANDROID_KEYSTORE_ALIAS }}
ANDROID_KEYSTORE_ALIAS_PASSWORD: ${{ secrets.ANDROID_KEYSTORE_ALIAS_PASSWORD }}
ANDROID_RELEASE_TYPE: 'APK' # or AAB
ANDROID_RELEASE_TYPE: 'AAB' # APK or AAB

jobs:
release:
runs-on: ubuntu-latest

steps:
- name: Checkout repository 🛎️
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup Java ☕
uses: actions/setup-java@v3
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '17'
distribution: 'zulu'

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

- name: Setup Node version 🍀
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: '18'
node-version: 20

- name: Install dependencies ⚙️
run: npm ci
Expand All @@ -56,15 +59,14 @@ jobs:
--keystorepass $ANDROID_KEYSTORE_PASSWORD \
--keystorealias $ANDROID_KEYSTORE_ALIAS \
--keystorealiaspass $ANDROID_KEYSTORE_ALIAS_PASSWORD \
--androidreleasetype $ANDROID_RELEASE_TYPE \
--signing-type apksigner
--androidreleasetype $ANDROID_RELEASE_TYPE
- name: Save artifacts 💾
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: android-release-app
path: |
android/app/build/outputs/apk/release/*
android/app/build/outputs/bundle/release/*
- name: Clean Keystore file 🧹
run: |
Expand Down
4 changes: 2 additions & 2 deletions android/variables.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
ext {
minSdkVersion = 22
minSdkVersion = 24
compileSdkVersion = 34
targetSdkVersion = 34
androidxActivityVersion = '1.8.0'
Expand All @@ -13,4 +13,4 @@ ext {
androidxJunitVersion = '1.1.5'
androidxEspressoCoreVersion = '3.5.1'
cordovaAndroidVersion = '10.1.1'
}
}
2 changes: 1 addition & 1 deletion scripts/capacitor/build-android.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ async function run() {
'--keystorealias $ANDROID_KEYSTORE_ALIAS',
'--keystorealiaspass $ANDROID_KEYSTORE_ALIAS_PASSWORD',
'--androidreleasetype $ANDROID_RELEASE_TYPE',
'--signing-type apksigner'
'--signing-type jarsigner'
]
await $$`cap build android ${buildArgs}`
}

0 comments on commit 5cf9763

Please sign in to comment.