fix: repair invalid YAML in workflow (collapsed step keys), use ${{}} in if-conditions
Some checks failed
Android Build & Publish / android (push) Has been cancelled

This commit is contained in:
Giancarmine Salucci
2026-05-25 21:13:20 +02:00
parent 1faf3cf961
commit fb96cf2436

View File

@@ -43,7 +43,7 @@ jobs:
# ── 1. Source ──────────────────────────────────────────────────────────── # ── 1. Source ────────────────────────────────────────────────────────────
- name: Checkout - name: Checkout
if: steps.dedup.outputs.skip != 'true' if: ${{ steps.dedup.outputs.skip != 'true' }}
uses: actions/checkout@v4 uses: actions/checkout@v4
with: with:
# Full history + tags required for the changelog step. # Full history + tags required for the changelog step.
@@ -51,7 +51,7 @@ jobs:
# ── 2. Java ────────────────────────────────────────────────────────────── # ── 2. Java ──────────────────────────────────────────────────────────────
- name: Set up JDK 21 - name: Set up JDK 21
if: steps.dedup.outputs.skip != 'true' if: ${{ steps.dedup.outputs.skip != 'true' }}
uses: actions/setup-java@v4 uses: actions/setup-java@v4
with: with:
distribution: temurin distribution: temurin
@@ -59,7 +59,7 @@ jobs:
# ── 3. Node.js ─────────────────────────────────────────────────────────── # ── 3. Node.js ───────────────────────────────────────────────────────────
- name: Set up Node 22 - name: Set up Node 22
if: steps.dedup.outputs.skip != 'true' if: ${{ steps.dedup.outputs.skip != 'true' }}
uses: actions/setup-node@v4 uses: actions/setup-node@v4
with: with:
node-version: '22' node-version: '22'
@@ -67,7 +67,7 @@ jobs:
# ── 4. Android SDK ─────────────────────────────────────────────────────── # ── 4. Android SDK ───────────────────────────────────────────────────────
- name: Install Android SDK command-line tools - name: Install Android SDK command-line tools
if: steps.dedup.outputs.skip != 'true' if: ${{ steps.dedup.outputs.skip != 'true' }}
run: | run: |
SDK_DIR="$HOME/android-sdk" SDK_DIR="$HOME/android-sdk"
echo "ANDROID_HOME=$SDK_DIR" >> "$GITHUB_ENV" echo "ANDROID_HOME=$SDK_DIR" >> "$GITHUB_ENV"
@@ -86,7 +86,7 @@ jobs:
echo "$SDK_DIR/platform-tools" >> "$GITHUB_PATH" echo "$SDK_DIR/platform-tools" >> "$GITHUB_PATH"
- name: Accept SDK licenses & install platform/build-tools - name: Accept SDK licenses & install platform/build-tools
if: steps.dedup.outputs.skip != 'true' if: ${{ steps.dedup.outputs.skip != 'true' }}
run: | run: |
# { yes || true } absorbs the SIGPIPE that 'yes' gets when sdkmanager closes # { yes || true } absorbs the SIGPIPE that 'yes' gets when sdkmanager closes
# stdin after accepting all prompts — avoids exit-code 141 under 'pipefail'. # stdin after accepting all prompts — avoids exit-code 141 under 'pipefail'.
@@ -98,7 +98,7 @@ jobs:
# ── 5. Caches ──────────────────────────────────────────────────────────── # ── 5. Caches ────────────────────────────────────────────────────────────
- name: Cache Gradle files - name: Cache Gradle files
if: steps.dedup.outputs.skip != 'true' if: ${{ steps.dedup.outputs.skip != 'true' }}
uses: actions/cache@v4 uses: actions/cache@v4
with: with:
path: | path: |
@@ -109,11 +109,11 @@ jobs:
# ── 6. JS build ────────────────────────────────────────────────────────── # ── 6. JS build ──────────────────────────────────────────────────────────
- name: Install JS dependencies - name: Install JS dependencies
if: steps.dedup.outputs.skip != 'true' if: ${{ steps.dedup.outputs.skip != 'true' }}
run: npm ci run: npm ci
- name: Build web assets - name: Build web assets
if: steps.dedup.outputs.skip != 'true' if: ${{ steps.dedup.outputs.skip != 'true' }}
env: env:
# Embed the CI run number as the app's build identifier so the # Embed the CI run number as the app's build identifier so the
# in-app update check can compare against Gitea release tags. # in-app update check can compare against Gitea release tags.
@@ -121,15 +121,17 @@ jobs:
run: npm run build run: npm run build
# ── 7. Capacitor sync ──────────────────────────────────────────────────── # ── 7. Capacitor sync ────────────────────────────────────────────────────
- name: Capacitor sync android if: steps.dedup.outputs.skip != 'true' run: npx cap sync android - name: Capacitor sync android
if: ${{ steps.dedup.outputs.skip != 'true' }}
run: npx cap sync android
# ── 8. Android build ───────────────────────────────────────────────────── # ── 8. Android build ─────────────────────────────────────────────────────
- name: Make gradlew executable - name: Make gradlew executable
if: steps.dedup.outputs.skip != 'true' if: ${{ steps.dedup.outputs.skip != 'true' }}
run: chmod +x android/gradlew run: chmod +x android/gradlew
- name: Build Debug APK - name: Build Debug APK
if: steps.dedup.outputs.skip != 'true' if: ${{ steps.dedup.outputs.skip != 'true' }}
working-directory: android working-directory: android
run: | run: |
# Retry up to 3 times to survive transient network errors when the # Retry up to 3 times to survive transient network errors when the
@@ -140,7 +142,7 @@ jobs:
done done
- name: Build Release APK (unsigned — no signing key required) - name: Build Release APK (unsigned — no signing key required)
if: steps.dedup.outputs.skip != 'true' if: ${{ steps.dedup.outputs.skip != 'true' }}
working-directory: android working-directory: android
run: | run: |
for attempt in 1 2 3; do for attempt in 1 2 3; do
@@ -149,7 +151,9 @@ jobs:
done done
# ── 9. Upload APKs as workflow artifacts ───────────────────────────────── # ── 9. Upload APKs as workflow artifacts ─────────────────────────────────
- name: Upload APKs as artifacts if: steps.dedup.outputs.skip != 'true' uses: actions/upload-artifact@v3 - name: Upload APKs as artifacts
if: ${{ steps.dedup.outputs.skip != 'true' }}
uses: actions/upload-artifact@v3
with: with:
name: scopone-android-${{ github.run_number }} name: scopone-android-${{ github.run_number }}
path: | path: |
@@ -158,7 +162,9 @@ jobs:
retention-days: 30 retention-days: 30
# ── 10. Publish to Gitea generic package registry ──────────────────────── # ── 10. Publish to Gitea generic package registry ────────────────────────
- name: Publish APKs to Gitea package registry if: steps.dedup.outputs.skip != 'true' env: - name: Publish APKs to Gitea package registry
if: ${{ steps.dedup.outputs.skip != 'true' }}
env:
TOKEN: ${{ secrets.PACKAGE_TOKEN }} TOKEN: ${{ secrets.PACKAGE_TOKEN }}
run: | run: |
set -euo pipefail set -euo pipefail
@@ -195,7 +201,7 @@ jobs:
# scopes. If the PAT lacks write:repository the curl will return 403 and # scopes. If the PAT lacks write:repository the curl will return 403 and
# the step will fail — update the PAT scopes on the Gitea web UI. # the step will fail — update the PAT scopes on the Gitea web UI.
- name: Create Gitea release - name: Create Gitea release
if: steps.dedup.outputs.skip != 'true' if: ${{ steps.dedup.outputs.skip != 'true' }}
env: env:
TOKEN: ${{ secrets.PACKAGE_TOKEN }} TOKEN: ${{ secrets.PACKAGE_TOKEN }}
run: | run: |