Skip to content

Commit

Permalink
Merge pull request #1866 from Lymia/fix_ci_in_forks
Browse files Browse the repository at this point in the history
Fixes CI in forks.
  • Loading branch information
Robosturm authored Jan 19, 2025
2 parents e1c0018 + ef710a7 commit 0e35773
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,14 @@ jobs:
working-directory: '${{github.workspace}}/build'
run: cmake --build '${{github.workspace}}/build' --target all -j4

- name: Setup (Sign APK)
if: matrix.target == 'android' && github.repository == 'Robosturm/Commander_Wars'
run: echo "SIGN_FLAG=--sign" >> $GITHUB_ENV

- name: Setup (Do not sign APK)
if: matrix.target == 'android' && github.repository != 'Robosturm/Commander_Wars'
run: echo "SIGN_FLAG=" >> $GITHUB_ENV

- name: Bundle APK
if: matrix.target == 'android'
env:
Expand All @@ -247,14 +255,20 @@ jobs:
QT_ANDROID_KEYSTORE_STORE_PASS: ${{secrets.ANDROIDSTOREPASS}}
QT_ANDROID_KEYSTORE_KEY_PASS: ${{secrets.ANDROIDSTOREPASS}}
JAVA_HOME: ${{env.JAVA_PATH}}
run: |
run: |
"${{github.workspace}}/qt/Qt/${{env.QT_Version}}/${{matrix.qtCoreToolsPath}}/bin/androiddeployqt.exe" \
--input ${{env.workspace}}/build/android-Commander_Wars-deployment-settings.json \
--output ${{env.workspace}}/build/android-build \
--android-platform android-34 \
--gradle \
--release \
--sign
$SIGN_FLAG
- name: Rename unsigned APK for packaging
if: matrix.target == 'android' && github.repository != 'Robosturm/Commander_Wars'
run: |
mv "${{github.workspace}}/build/android-build/build/outputs/apk/release/android-build-release-unsigned.apk" \
"${{github.workspace}}/build/android-build/build/outputs/apk/release/android-build-release-signed.apk"
- name: Build linux
if: matrix.linuxFlag == 'linux'
Expand Down

0 comments on commit 0e35773

Please sign in to comment.