Update capacitor monorepo to ^8.5.0 #7565
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # NOTE: This name appears in GitHub's Checks API and in workflow's status badge. | |
| name: ci-build | |
| # Trigger the workflow when: | |
| on: | |
| # A push occurs to one of the matched branches. | |
| push: | |
| branches: | |
| - master | |
| - stable/* | |
| # Or when a pull request event occurs for a pull request against one of the | |
| # matched branches. | |
| pull_request: | |
| branches: | |
| - master | |
| - stable/* | |
| # Explicitly disable secrets.GITHUB_TOKEN permissions. | |
| permissions: {} | |
| jobs: | |
| build: | |
| # NOTE: This name appears in GitHub's Checks API. | |
| name: build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| # Needed for correct git commit count | |
| fetch-depth: 0 | |
| - name: Set up OpenJDK 21 | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: 'temurin' | |
| java-version: '21' | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '24.x' | |
| cache: yarn | |
| - name: Install dependencies | |
| run: yarn install --frozen-lockfile | |
| - name: Set workflow variables | |
| # Id is needed to access output in a next step. | |
| id: vars | |
| run: | | |
| echo "SHORT_SHA=$(git rev-parse --short HEAD)" >> "$GITHUB_OUTPUT" | |
| echo "VERSION_CODE_OVERRIDE=$(node ./internals/scripts/getVersionCode.js)" >> "$GITHUB_OUTPUT" | |
| - name: Build web ROSE Wallet | |
| run: yarn build | |
| - name: Build extension ROSE Wallet | |
| run: yarn build:ext | |
| - name: Sync Capacitor for Android | |
| if: github.event_name == 'push' | |
| run: yarn cap sync android | |
| - name: Accept SDK licenses | |
| if: github.event_name == 'push' | |
| run: yes | "$ANDROID_SDK_ROOT/cmdline-tools/latest/bin/sdkmanager" --licenses | |
| # Capacitor v8 targets SDK 36 | |
| - name: Install SDK components | |
| if: github.event_name == 'push' | |
| run: | | |
| "$ANDROID_SDK_ROOT/cmdline-tools/latest/bin/sdkmanager" "platform-tools" "platforms;android-36" "build-tools;36.0.0" | |
| - name: Build Android App Bundle (AAB) | |
| if: github.event_name == 'push' | |
| run: ./gradlew bundleRelease -PversionCodeOverride=${{ steps.vars.outputs.VERSION_CODE_OVERRIDE }} | |
| working-directory: android | |
| - name: Build Android Package (APK) | |
| if: github.event_name == 'push' | |
| run: ./gradlew assembleRelease -PversionCodeOverride=${{ steps.vars.outputs.VERSION_CODE_OVERRIDE }} | |
| working-directory: android | |
| # Targeting version 30 and above we need to align the APK so that all uncompressed data starts on a 4-byte boundary | |
| - name: Zipalign APK | |
| if: github.event_name == 'push' | |
| run: | | |
| "$ANDROID_SDK_ROOT/build-tools/36.0.0/zipalign" -v 4 "android/app/build/outputs/apk/release/app-release-unsigned.apk" "android/app/build/outputs/apk/release/app-release-aligned.apk" | |
| - name: Decode and Save Keystore File | |
| if: github.event_name == 'push' | |
| run: | | |
| echo "${{ secrets.KEYSTORE_FILE }}" | base64 --decode > "android/release.jks" | |
| - name: Sign AAB and APK | |
| # Security: should not sign apks on unmerged pullrequest. Otherwise someone | |
| # could sign a malicious app and distribute it with our valid signature (though | |
| # outside playstore). | |
| if: github.event_name == 'push' | |
| run: | | |
| jarsigner -verbose -keystore "android/release.jks" -storepass "${{ secrets.KEYSTORE_PASSWORD }}" -keypass "${{ secrets.KEYSTORE_PASSWORD }}" -signedjar "android/app/build/outputs/bundle/release/app-release-signed.aab" "android/app/build/outputs/bundle/release/app-release.aab" "${{ secrets.KEY_ALIAS }}" | |
| "$ANDROID_SDK_ROOT/build-tools/36.0.0/apksigner" sign --ks "android/release.jks" --ks-pass "pass:${{ secrets.KEYSTORE_PASSWORD }}" --key-pass "pass:${{ secrets.KEYSTORE_PASSWORD }}" --ks-key-alias "${{ secrets.KEY_ALIAS }}" "android/app/build/outputs/apk/release/app-release-aligned.apk" | |
| - name: Upload Android AAB build artifacts | |
| if: github.event_name == 'push' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: rose-wallet-android-${{ steps.vars.outputs.SHORT_SHA }}.aab | |
| path: android/app/build/outputs/bundle/release/app-release-signed.aab | |
| - name: Upload Android APK build artifacts | |
| if: github.event_name == 'push' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: rose-wallet-android-${{ steps.vars.outputs.SHORT_SHA }}.apk | |
| path: android/app/build/outputs/apk/release/app-release-aligned.apk | |
| - name: Upload web ROSE Wallet build artifacts | |
| if: github.event_name == 'push' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: rose-wallet-web-${{ steps.vars.outputs.SHORT_SHA }} | |
| path: build | |
| - name: Upload extension ROSE Wallet build artifacts | |
| if: github.event_name == 'push' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: rose-wallet-ext-${{ steps.vars.outputs.SHORT_SHA }} | |
| path: build-ext |