From 2aa5663bab45a7af1df4aa8ab124f86d661a05dd Mon Sep 17 00:00:00 2001 From: Steven Enamakel Date: Wed, 4 Feb 2026 08:18:34 +0530 Subject: [PATCH] refactor: standardize quotes and comment out Android packaging workflow in CI - Updated quotes in the package-and-publish.yml file for consistency, changing single quotes to double quotes. - Commented out the package-android job to disable Android APK packaging in the CI workflow temporarily. --- .github/workflows/package-and-publish.yml | 229 +++++++++++----------- 1 file changed, 115 insertions(+), 114 deletions(-) diff --git a/.github/workflows/package-and-publish.yml b/.github/workflows/package-and-publish.yml index bb42e8063..670f6d382 100644 --- a/.github/workflows/package-and-publish.yml +++ b/.github/workflows/package-and-publish.yml @@ -10,7 +10,7 @@ name: Package and publish on: workflow_run: - workflows: ['Version Bump'] + workflows: ["Version Bump"] types: - completed branches: @@ -164,12 +164,12 @@ jobs: fail-fast: false matrix: settings: - - platform: 'macos-latest' - args: '--target aarch64-apple-darwin' - - platform: 'macos-latest' - args: '--target x86_64-apple-darwin' - - platform: 'ubuntu-22.04' - args: '' + - platform: "macos-latest" + args: "--target aarch64-apple-darwin" + - platform: "macos-latest" + args: "--target x86_64-apple-darwin" + - platform: "ubuntu-22.04" + args: "" runs-on: ${{ matrix.settings.platform }} steps: - name: Checkout @@ -188,7 +188,7 @@ jobs: uses: actions/setup-node@v4 with: node-version: 24.x - cache: 'yarn' + cache: "yarn" - name: Install Rust stable uses: dtolnay/rust-toolchain@stable @@ -307,7 +307,7 @@ jobs: TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.UPDATER_PRIVATE_KEY_PASSWORD }} WITH_UPDATER: ${{ needs.get-version.outputs.should-publish != '' && 'true' || 'false' }} with: - args: '-c ${{ steps.config-overrides.outputs.json }} ${{ matrix.settings.args }}' + args: "-c ${{ steps.config-overrides.outputs.json }} ${{ matrix.settings.args }}" includeDebug: ${{ needs.get-version.outputs.should-publish == '' && inputs.forceRelease != 'true' }} includeRelease: ${{ needs.get-version.outputs.should-publish != '' || inputs.forceRelease == 'true' }} releaseId: ${{ needs.create-release.outputs.releaseId }} @@ -388,130 +388,131 @@ jobs: name: ${{ steps.file-info.outputs.filename }} path: ${{ steps.file-info.outputs.path }}/${{ steps.file-info.outputs.filename }} - package-android: - name: Build and package Android APK - needs: [get-version, check-version, create-release] - if: ${{ !failure() && !cancelled() && needs.check-version.outputs.should-skip != 'true' }} - environment: Production - runs-on: ubuntu-22.04 - permissions: - contents: write - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - fetch-depth: 1 - ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.ref || github.ref }} + # package-android: + # name: Build and package Android APK + # needs: [get-version, check-version, create-release] + # if: ${{ !failure() && !cancelled() && needs.check-version.outputs.should-skip != 'true' }} + # environment: Production + # runs-on: ubuntu-22.04 + # permissions: + # contents: write + # steps: + # - name: Checkout + # uses: actions/checkout@v4 + # with: + # fetch-depth: 1 + # ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.ref || github.ref }} - - name: Setup Node.js 24.x - uses: actions/setup-node@v4 - with: - node-version: 24.x - cache: 'yarn' + # - name: Setup Node.js 24.x + # uses: actions/setup-node@v4 + # with: + # node-version: 24.x + # cache: 'yarn' - - name: Install Rust stable - uses: dtolnay/rust-toolchain@stable - with: - targets: aarch64-linux-android,armv7-linux-androideabi,x86_64-linux-android + # - name: Install Rust stable + # uses: dtolnay/rust-toolchain@stable + # with: + # targets: aarch64-linux-android,armv7-linux-androideabi,x86_64-linux-android - - name: Setup Java 17 - uses: actions/setup-java@v4 - with: - distribution: 'temurin' - java-version: '17' + # - name: Setup Java 17 + # uses: actions/setup-java@v4 + # with: + # distribution: 'temurin' + # java-version: '17' - - name: Setup Android SDK - uses: android-actions/setup-android@v3 + # - name: Setup Android SDK + # uses: android-actions/setup-android@v3 - - name: Install Android NDK - run: sdkmanager --install "ndk;27.0.12077973" + # - name: Install Android NDK + # run: sdkmanager --install "ndk;27.0.12077973" - - name: Set NDK path - run: echo "NDK_HOME=$ANDROID_HOME/ndk/27.0.12077973" >> $GITHUB_ENV + # - name: Set NDK path + # run: echo "NDK_HOME=$ANDROID_HOME/ndk/27.0.12077973" >> $GITHUB_ENV - - name: Cache node modules - id: yarn-cache - uses: actions/cache@v4 - with: - path: node_modules - key: ${{ runner.os }}-build-${{ hashFiles('**/yarn.lock') }} - restore-keys: | - ${{ runner.os }}-build- + # - name: Cache node modules + # id: yarn-cache + # uses: actions/cache@v4 + # with: + # path: node_modules + # key: ${{ runner.os }}-build-${{ hashFiles('**/yarn.lock') }} + # restore-keys: | + # ${{ runner.os }}-build- - - name: Install dependencies - if: steps.yarn-cache.outputs.cache-hit != 'true' - run: yarn install --frozen-lockfile + # - name: Install dependencies + # if: steps.yarn-cache.outputs.cache-hit != 'true' + # run: yarn install --frozen-lockfile - - name: Build frontend - run: yarn build - env: - NODE_ENV: production - VITE_BACKEND_URL: ${{ vars.VITE_BACKEND_URL }} - VITE_TELEGRAM_BOT_USERNAME: ${{ secrets.VITE_TELEGRAM_BOT_USERNAME }} - VITE_TELEGRAM_BOT_ID: ${{ secrets.VITE_TELEGRAM_BOT_ID }} - VITE_TELEGRAM_API_ID: ${{ secrets.VITE_TELEGRAM_API_ID }} - VITE_TELEGRAM_API_HASH: ${{ secrets.VITE_TELEGRAM_API_HASH }} - VITE_SENTRY_DSN: ${{ secrets.VITE_SENTRY_DSN }} - VITE_SKILLS_GITHUB_REPO: ${{ vars.VITE_SKILLS_GITHUB_REPO }} - VITE_DEBUG: ${{ vars.VITE_DEBUG }} + # - name: Build frontend + # run: yarn build + # env: + # NODE_ENV: production + # VITE_BACKEND_URL: ${{ vars.VITE_BACKEND_URL }} + # VITE_TELEGRAM_BOT_USERNAME: ${{ secrets.VITE_TELEGRAM_BOT_USERNAME }} + # VITE_TELEGRAM_BOT_ID: ${{ secrets.VITE_TELEGRAM_BOT_ID }} + # VITE_TELEGRAM_API_ID: ${{ secrets.VITE_TELEGRAM_API_ID }} + # VITE_TELEGRAM_API_HASH: ${{ secrets.VITE_TELEGRAM_API_HASH }} + # VITE_SENTRY_DSN: ${{ secrets.VITE_SENTRY_DSN }} + # VITE_SKILLS_GITHUB_REPO: ${{ vars.VITE_SKILLS_GITHUB_REPO }} + # VITE_DEBUG: ${{ vars.VITE_DEBUG }} - - name: Initialize Tauri Android - run: npx tauri android init + # - name: Initialize Tauri Android + # run: npx tauri android init - - name: Decode keystore - if: needs.get-version.outputs.should-publish != '' - env: - ANDROID_KEYSTORE: ${{ secrets.ANDROID_KEYSTORE }} - run: | - echo "$ANDROID_KEYSTORE" | base64 --decode > ${{ github.workspace }}/release.jks + # - name: Decode keystore + # if: needs.get-version.outputs.should-publish != '' + # env: + # ANDROID_KEYSTORE: ${{ secrets.ANDROID_KEYSTORE }} + # run: | + # echo "$ANDROID_KEYSTORE" | base64 --decode > ${{ github.workspace }}/release.jks - - name: Build Android APK (signed) - if: needs.get-version.outputs.should-publish != '' - env: - BASE_URL: ${{ vars.BASE_URL }} - ANDROID_KEYSTORE_PATH: ${{ github.workspace }}/release.jks - ANDROID_KEYSTORE_PASSWORD: ${{ secrets.ANDROID_KEYSTORE_PASSWORD }} - ANDROID_KEY_ALIAS: ${{ secrets.ANDROID_KEY_ALIAS }} - ANDROID_KEY_PASSWORD: ${{ secrets.ANDROID_KEY_PASSWORD }} - run: npx tauri android build --apk + # - name: Build Android APK (signed) + # if: needs.get-version.outputs.should-publish != '' + # env: + # BASE_URL: ${{ vars.BASE_URL }} + # ANDROID_KEYSTORE_PATH: ${{ github.workspace }}/release.jks + # ANDROID_KEYSTORE_PASSWORD: ${{ secrets.ANDROID_KEYSTORE_PASSWORD }} + # ANDROID_KEY_ALIAS: ${{ secrets.ANDROID_KEY_ALIAS }} + # ANDROID_KEY_PASSWORD: ${{ secrets.ANDROID_KEY_PASSWORD }} + # run: npx tauri android build --apk - - name: Build Android APK (unsigned) - if: needs.get-version.outputs.should-publish == '' - env: - BASE_URL: ${{ vars.BASE_URL }} - run: npx tauri android build --apk + # - name: Build Android APK (unsigned) + # if: needs.get-version.outputs.should-publish == '' + # env: + # BASE_URL: ${{ vars.BASE_URL }} + # run: npx tauri android build --apk - - name: Find APK - id: find-apk - run: | - APK_PATH=$(find gen/android -name '*.apk' -type f | head -1) - if [ -z "$APK_PATH" ]; then - echo "No APK found" - exit 1 - fi - APK_FILENAME=$(basename "$APK_PATH") - echo "path=$APK_PATH" >> $GITHUB_OUTPUT - echo "filename=$APK_FILENAME" >> $GITHUB_OUTPUT + # - name: Find APK + # id: find-apk + # run: | + # APK_PATH=$(find gen/android -name '*.apk' -type f | head -1) + # if [ -z "$APK_PATH" ]; then + # echo "No APK found" + # exit 1 + # fi + # APK_FILENAME=$(basename "$APK_PATH") + # echo "path=$APK_PATH" >> $GITHUB_OUTPUT + # echo "filename=$APK_FILENAME" >> $GITHUB_OUTPUT - - name: Upload APK artifact - uses: actions/upload-artifact@v4 - with: - name: android-apk - path: ${{ steps.find-apk.outputs.path }} + # - name: Upload APK artifact + # uses: actions/upload-artifact@v4 + # with: + # name: android-apk + # path: ${{ steps.find-apk.outputs.path }} - - name: Upload APK to release - if: needs.get-version.outputs.should-publish != '' - env: - RELEASE_ID: ${{ needs.create-release.outputs.releaseId }} - run: | - curl -X POST -H "Authorization: Bearer $XGH_TOKEN" \ - -H "Content-Type: application/octet-stream" \ - --data-binary "@${{ steps.find-apk.outputs.path }}" \ - "https://uploads.github.com/repos/$PUBLISH_REPO/releases/$RELEASE_ID/assets?name=${{ steps.find-apk.outputs.filename }}" + # - name: Upload APK to release + # if: needs.get-version.outputs.should-publish != '' + # env: + # RELEASE_ID: ${{ needs.create-release.outputs.releaseId }} + # run: | + # curl -X POST -H "Authorization: Bearer $XGH_TOKEN" \ + # -H "Content-Type: application/octet-stream" \ + # --data-binary "@${{ steps.find-apk.outputs.path }}" \ + # "https://uploads.github.com/repos/$PUBLISH_REPO/releases/$RELEASE_ID/assets?name=${{ steps.find-apk.outputs.filename }}" publish-release: runs-on: ubuntu-latest - needs: [get-version, check-version, create-release, package-tauri, package-android] + # needs: [get-version, check-version, create-release, package-tauri, package-android] + needs: [get-version, check-version, create-release, package-tauri] environment: Production if: needs.get-version.outputs.should-publish != '' && needs.check-version.outputs.should-skip != 'true' permissions: