mirror of
https://github.com/quik-sms/quik.git
synced 2026-11-18 03:48:52 +01:00
clean up gh actions
This commit is contained in:
@@ -4,7 +4,7 @@ on:
|
||||
workflow_dispatch:
|
||||
pull_request:
|
||||
branches:
|
||||
- '**'
|
||||
- master
|
||||
|
||||
jobs:
|
||||
build:
|
||||
@@ -13,21 +13,23 @@ jobs:
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Decode Keystore File
|
||||
run: echo "${{ secrets.KEYSTORE_FILE }}" | base64 -d > ${{ github.workspace }}/my-release-key.keystore
|
||||
|
||||
|
||||
- name: Validate Gradle Wrapper
|
||||
uses: gradle/wrapper-validation-action@v1
|
||||
|
||||
- name: Set up JDK 17
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: 'temurin'
|
||||
java-version: '17'
|
||||
cache: gradle
|
||||
|
||||
- name: Build with Gradle
|
||||
run: |
|
||||
./gradlew assembleDebug \
|
||||
-Dandroid.injected.signing.store.file=${{ github.workspace }}/my-release-key.keystore
|
||||
|
||||
run: ./gradlew assembleDebug
|
||||
|
||||
- name: Run Android Lint
|
||||
run: ./gradlew lint
|
||||
|
||||
- name: Run Tests
|
||||
run: ./gradlew test
|
||||
|
||||
@@ -35,8 +37,21 @@ jobs:
|
||||
run: ls -R presentation/build/outputs/apk/debug
|
||||
|
||||
- name: Rename APK
|
||||
run: mv presentation/build/outputs/apk/debug/QUIK-v*-debug.apk presentation/build/outputs/apk/debug/QUIK-debug.apk
|
||||
|
||||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
shopt -s nullglob
|
||||
mapfile -t apk_files < <(printf '%s\n' presentation/build/outputs/apk/debug/QUIK-v*-debug.apk)
|
||||
if [[ "${#apk_files[@]}" -eq 0 ]]; then
|
||||
echo "No APK found matching QUIK-v*-debug.apk" >&2
|
||||
exit 1
|
||||
fi
|
||||
if [[ "${#apk_files[@]}" -gt 1 ]]; then
|
||||
echo "Multiple APKs found: ${apk_files[*]}" >&2
|
||||
exit 1
|
||||
fi
|
||||
mv "${apk_files[0]}" presentation/build/outputs/apk/debug/QUIK-debug.apk
|
||||
|
||||
- name: Upload App
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
|
||||
Reference in New Issue
Block a user