name: Build Custom Bluesky APK on: push: branches: - main workflow_dispatch: jobs: build-android: runs-on: ubuntu-latest steps: - name: Checkout Source Code uses: actions/checkout@v4 - name: Set up Node.js Environment uses: actions/setup-node@v4 with: node-version-file: '.nvmrc' - name: Set up Java Development Kit (JDK) uses: actions/setup-java@v4 with: distribution: 'temurin' java-version: '17' - name: Install Android SDK Dependencies uses: android-actions/setup-android@v3 - name: Enable Corepack run: corepack enable - name: Get pnpm store directory id: pnpm-cache run: echo "STORE_PATH=$(pnpm store path)" >> "$GITHUB_OUTPUT" - name: Cache pnpm store uses: actions/cache@v4 with: path: ${{ steps.pnpm-cache.outputs.STORE_PATH }} key: pnpm-store-${{ hashFiles('pnpm-lock.yaml') }} restore-keys: | pnpm-store- - name: Install Project Dependencies run: pnpm install --frozen-lockfile --network-concurrency 4 --fetch-timeout 120000 - name: Install EAS CLI run: | pnpm config set global-bin-dir /root/.local/share/pnpm/bin echo "/root/.local/share/pnpm/bin" >> "$GITHUB_PATH" export PATH="/root/.local/share/pnpm/bin:$PATH" pnpm add -g eas-cli eas --version - name: Inject Private Firebase Configuration run: | echo "${{ secrets.FIREBASE_JSON_BASE64 }}" | base64 -d > google-services.json - name: Inject Release Keystore Certificate run: | echo "${{ secrets.ANDROID_KEYSTORE_BASE64 }}" | base64 -d > release.keystore - name: Generate Local Credentials File env: KEYSTORE_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }} KEY_ALIAS: ${{ secrets.KEY_ALIAS }} KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }} run: | cat < credentials.json { "android": { "keystore": { "keystorePath": "release.keystore", "keystorePassword": "$KEYSTORE_PASSWORD", "keyAlias": "$KEY_ALIAS", "keyPassword": "$KEY_PASSWORD" } } } EOF - name: Run EAS Local Build env: EAS_NO_VCS: 1 EXPO_TOKEN: ${{ secrets.EXPO_TOKEN }} run: | eas build --platform android --profile selfhosted-android --local --non-interactive --output ./bluesky-custom.apk - name: Upload Signed Application Artifact uses: actions/upload-artifact@v4 with: name: Bluesky-Custom-Release path: bluesky-custom.apk