Update project roadmap with Room DB metadata caching plan #47
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
| name: Dev Build & Test | |
| on: | |
| push: | |
| branches: [ "master" ] | |
| workflow_dispatch: | |
| jobs: | |
| build-release-check: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write # Required for creating GitHub Releases | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup JDK 21 | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: 'zulu' | |
| java-version: '21' | |
| cache: 'gradle' | |
| # Added Ruby for Fastlane in Dev | |
| - name: Setup Ruby | |
| uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: '3.0' | |
| - name: Install Fastlane | |
| run: gem install fastlane | |
| # --- 1. SECRETS INJECTION --- | |
| - name: Decode Keystore | |
| env: | |
| ANDROID_KEYSTORE_BASE64: ${{ secrets.ANDROID_KEYSTORE_BASE64 }} | |
| run: echo "$ANDROID_KEYSTORE_BASE64" | base64 --decode > app/release.jks | |
| # Added Play Store JSON for Dev (needed for Internal Track upload) | |
| - name: Decode Google Play Service Account | |
| env: | |
| PLAY_STORE_JSON_KEY: ${{ secrets.PLAY_STORE_JSON_KEY }} | |
| run: echo "$PLAY_STORE_JSON_KEY" > app/google-play-api.json | |
| - name: Grant execute permission for gradlew | |
| run: chmod +x gradlew | |
| # --- 2. BUILD & DEPLOY (FASTLANE) --- | |
| # Replaced manual Gradle command with Fastlane lane | |
| - name: Run Fastlane (Distribute Dev) | |
| env: | |
| JSON_KEY_FILE: ${{ github.workspace }}/app/google-play-api.json | |
| SUPPLY_JSON_KEY: ${{ github.workspace }}/app/google-play-api.json | |
| KEY_ALIAS: ${{ secrets.KEY_ALIAS }} | |
| KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }} | |
| KEYSTORE_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }} | |
| KEYSTORE_FILE_PATH: ${{ github.workspace }}/app/release.jks | |
| run: fastlane android distribute_dev | |
| # --- 3. TELEGRAM --- | |
| - name: Send APK to Telegram | |
| if: success() | |
| env: | |
| TELEGRAM_TOKEN: ${{ secrets.TELEGRAM_TOKEN }} | |
| TELEGRAM_CHAT_ID: ${{ secrets.TELEGRAM_CHAT_ID }} | |
| run: | | |
| # Fastlane 'copyStoreReleaseApk' task puts it here | |
| APK_PATH=$(find app/build/distribution/store -name "*.apk" | head -n 1) | |
| if [ ! -f "$APK_PATH" ]; then | |
| echo "Error: APK not found in app/build/distribution/store/" | |
| exit 1 | |
| fi | |
| echo "Sending $APK_PATH to Telegram..." | |
| CAPTION="🚀 *Thor (Valhalla) Dev Build* | |
| branch: ${{ github.ref_name }} | |
| author: ${{ github.actor }} | |
| track: Internal Testing | |
| status: Uploaded to Play Store & GitHub" | |
| curl -s -F "chat_id=$TELEGRAM_CHAT_ID" \ | |
| -F "document=@$APK_PATH" \ | |
| -F "caption=$CAPTION" \ | |
| -F "parse_mode=Markdown" \ | |
| "https://api.telegram.org/bot$TELEGRAM_TOKEN/sendDocument" > /dev/null | |
| # --- 4. GITHUB RELEASE (PRE-RELEASE) --- | |
| - name: Read Version Info | |
| id: get_version | |
| run: | | |
| VERSION_NAME=$(cat version_name.txt) | |
| echo "version_name=$VERSION_NAME" >> "$GITHUB_OUTPUT" | |
| - name: Create GitHub Pre-Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| # Unique tag for dev builds: v1.0.0-dev-45 | |
| tag_name: v${{ steps.get_version.outputs.version_name }}-dev-${{ github.run_number }} | |
| name: Dev Build v${{ steps.get_version.outputs.version_name }} (${{ github.run_number }}) | |
| files: | | |
| app/build/distribution/foss/foss-release.apk | |
| app/build/distribution/store/store-release.apk | |
| draft: false | |
| prerelease: true | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| # --- 5. CLEANUP --- | |
| - name: Cleanup sensitive files | |
| if: always() | |
| run: | | |
| rm -f app/release.jks | |
| rm -f app/google-play-api.json |