fix: repair invalid YAML in workflow (collapsed step keys), use ${{}} in if-conditions
Some checks failed
Android Build & Publish / android (push) Has been cancelled
Some checks failed
Android Build & Publish / android (push) Has been cancelled
This commit is contained in:
@@ -43,7 +43,7 @@ jobs:
|
||||
|
||||
# ── 1. Source ────────────────────────────────────────────────────────────
|
||||
- name: Checkout
|
||||
if: steps.dedup.outputs.skip != 'true'
|
||||
if: ${{ steps.dedup.outputs.skip != 'true' }}
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
# Full history + tags required for the changelog step.
|
||||
@@ -51,7 +51,7 @@ jobs:
|
||||
|
||||
# ── 2. Java ──────────────────────────────────────────────────────────────
|
||||
- name: Set up JDK 21
|
||||
if: steps.dedup.outputs.skip != 'true'
|
||||
if: ${{ steps.dedup.outputs.skip != 'true' }}
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: temurin
|
||||
@@ -59,7 +59,7 @@ jobs:
|
||||
|
||||
# ── 3. Node.js ───────────────────────────────────────────────────────────
|
||||
- name: Set up Node 22
|
||||
if: steps.dedup.outputs.skip != 'true'
|
||||
if: ${{ steps.dedup.outputs.skip != 'true' }}
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '22'
|
||||
@@ -67,7 +67,7 @@ jobs:
|
||||
|
||||
# ── 4. Android SDK ───────────────────────────────────────────────────────
|
||||
- name: Install Android SDK command-line tools
|
||||
if: steps.dedup.outputs.skip != 'true'
|
||||
if: ${{ steps.dedup.outputs.skip != 'true' }}
|
||||
run: |
|
||||
SDK_DIR="$HOME/android-sdk"
|
||||
echo "ANDROID_HOME=$SDK_DIR" >> "$GITHUB_ENV"
|
||||
@@ -86,7 +86,7 @@ jobs:
|
||||
echo "$SDK_DIR/platform-tools" >> "$GITHUB_PATH"
|
||||
|
||||
- name: Accept SDK licenses & install platform/build-tools
|
||||
if: steps.dedup.outputs.skip != 'true'
|
||||
if: ${{ steps.dedup.outputs.skip != 'true' }}
|
||||
run: |
|
||||
# { yes || true } absorbs the SIGPIPE that 'yes' gets when sdkmanager closes
|
||||
# stdin after accepting all prompts — avoids exit-code 141 under 'pipefail'.
|
||||
@@ -98,7 +98,7 @@ jobs:
|
||||
|
||||
# ── 5. Caches ────────────────────────────────────────────────────────────
|
||||
- name: Cache Gradle files
|
||||
if: steps.dedup.outputs.skip != 'true'
|
||||
if: ${{ steps.dedup.outputs.skip != 'true' }}
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: |
|
||||
@@ -109,11 +109,11 @@ jobs:
|
||||
|
||||
# ── 6. JS build ──────────────────────────────────────────────────────────
|
||||
- name: Install JS dependencies
|
||||
if: steps.dedup.outputs.skip != 'true'
|
||||
if: ${{ steps.dedup.outputs.skip != 'true' }}
|
||||
run: npm ci
|
||||
|
||||
- name: Build web assets
|
||||
if: steps.dedup.outputs.skip != 'true'
|
||||
if: ${{ steps.dedup.outputs.skip != 'true' }}
|
||||
env:
|
||||
# Embed the CI run number as the app's build identifier so the
|
||||
# in-app update check can compare against Gitea release tags.
|
||||
@@ -121,15 +121,17 @@ jobs:
|
||||
run: npm run build
|
||||
|
||||
# ── 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 ─────────────────────────────────────────────────────
|
||||
- name: Make gradlew executable
|
||||
if: steps.dedup.outputs.skip != 'true'
|
||||
if: ${{ steps.dedup.outputs.skip != 'true' }}
|
||||
run: chmod +x android/gradlew
|
||||
|
||||
- name: Build Debug APK
|
||||
if: steps.dedup.outputs.skip != 'true'
|
||||
if: ${{ steps.dedup.outputs.skip != 'true' }}
|
||||
working-directory: android
|
||||
run: |
|
||||
# Retry up to 3 times to survive transient network errors when the
|
||||
@@ -140,7 +142,7 @@ jobs:
|
||||
done
|
||||
|
||||
- name: Build Release APK (unsigned — no signing key required)
|
||||
if: steps.dedup.outputs.skip != 'true'
|
||||
if: ${{ steps.dedup.outputs.skip != 'true' }}
|
||||
working-directory: android
|
||||
run: |
|
||||
for attempt in 1 2 3; do
|
||||
@@ -149,7 +151,9 @@ jobs:
|
||||
done
|
||||
|
||||
# ── 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:
|
||||
name: scopone-android-${{ github.run_number }}
|
||||
path: |
|
||||
@@ -158,7 +162,9 @@ jobs:
|
||||
retention-days: 30
|
||||
|
||||
# ── 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 }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
@@ -195,7 +201,7 @@ jobs:
|
||||
# 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.
|
||||
- name: Create Gitea release
|
||||
if: steps.dedup.outputs.skip != 'true'
|
||||
if: ${{ steps.dedup.outputs.skip != 'true' }}
|
||||
env:
|
||||
TOKEN: ${{ secrets.PACKAGE_TOKEN }}
|
||||
run: |
|
||||
|
||||
Reference in New Issue
Block a user