Skip to content
Merged
Changes from all commits
Commits
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
21 changes: 13 additions & 8 deletions .github/workflows/release-android-apk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -119,28 +119,33 @@ jobs:

- name: build apk
if: ${{ steps.check_build_artifact_exists.outputs.exists == 'true' && steps.check_app_artifact_exists.outputs.exists == 'true' }}
env:
APP_ROOT: ${{ inputs.app_root }}
run: |
cd ${{ inputs.app_root }}/android
cd "$APP_ROOT/android"
chmod +x gradlew
./gradlew assembleRelease

- name: sign apk
if: ${{ success() && hashFiles('./nx.json') != '' && steps.check_build_artifact_exists.outputs.exists == 'true' && steps.check_app_artifact_exists.outputs.exists == 'true'}}
run: |
jarsigner -verbose -sigalg SHA256withRSA -digestalg SHA-256 \
-keystore ${{ inputs.app_root }}/android/app/keystore.jks \
-keystore "$APP_ROOT/android/app/keystore.jks" \
-storepass "$ANDROID_STOREPASS" \
-keypass "$ANDROID_STOREPASS" \
${{ inputs.app_root }}/android/app/build/outputs/apk/release/app-release-unsigned.apk my-key
"$APP_ROOT/android/app/build/outputs/apk/release/app-release-unsigned.apk" my-key
env:
ANDROID_STOREPASS: ${{ secrets.ANDROID_STOREPASS }}
APP_ROOT: ${{ inputs.app_root }}

- name: align apk
if: ${{ success() && hashFiles('./nx.json') != '' && steps.check_build_artifact_exists.outputs.exists == 'true' && steps.check_app_artifact_exists.outputs.exists == 'true'}}
env:
APP_ROOT: ${{ inputs.app_root }}
run: |
${ANDROID_SDK_ROOT}/build-tools/35.0.0/zipalign -v 4 \
${{ inputs.app_root }}/android/app/build/outputs/apk/release/app-release-unsigned.apk \
${{ inputs.app_root }}/android/app/build/outputs/apk/release/app-release.apk
"${ANDROID_SDK_ROOT}/build-tools/35.0.0/zipalign" -v 4 \
"$APP_ROOT/android/app/build/outputs/apk/release/app-release-unsigned.apk" \
"$APP_ROOT/android/app/build/outputs/apk/release/app-release.apk"

- name: extract version from package.json
if: ${{ steps.check_build_artifact_exists.outputs.exists == 'true' && steps.check_app_artifact_exists.outputs.exists == 'true' }}
Expand All @@ -157,8 +162,8 @@ jobs:
if: ${{ steps.check_build_artifact_exists.outputs.exists == 'true' && steps.check_app_artifact_exists.outputs.exists == 'true' }}
id: check_release_exists
run: |
if gh release view "${{ env.RELEASE_TAG }}" &>/dev/null; then
echo "::warning::[Release] Release ${{ env.RELEASE_TAG }} already exists, skipping"
if gh release view "$RELEASE_TAG" &>/dev/null; then
echo "::warning::[Release] Release $RELEASE_TAG already exists, skipping"
echo "release_exists=true" >> $GITHUB_OUTPUT
fi
env:
Expand Down
Loading