Journal redesign US2+US3: tags, trip link, multiple places, date range #199
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
| # Build an installable Android debug APK and upload it as a downloadable | |
| # artifact — so an APK can be obtained with NO local Android toolchain: push (or | |
| # run this workflow manually), open the run, and download `postcards-debug-apk`. | |
| # Local headless build: `pnpm --filter postcards apk:debug` (see docs/NATIVE-BUILDS.md). | |
| name: Android APK (debug) | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - "claude/**" | |
| workflow_dispatch: | |
| # The release-publish step needs to create/replace a GitHub Release + its tag. | |
| permissions: | |
| contents: write | |
| concurrency: | |
| group: android-apk-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up pnpm | |
| uses: pnpm/action-setup@v4 | |
| - name: Set up Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| cache: pnpm | |
| - name: Set up JDK 17 | |
| # AGP 8.2.1 (android/build.gradle) targets JDK 17; gradlew self-bootstraps | |
| # its own Gradle, so no system Gradle is needed. | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: temurin | |
| java-version: "17" | |
| cache: gradle | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Build the web app | |
| run: pnpm --filter postcards build | |
| - name: Sync the Android project | |
| # Copies the fresh dist/ into the committed android/ project + updates plugins. | |
| run: pnpm --filter postcards exec cap sync android | |
| - name: Assemble the debug APK | |
| working-directory: apps/postcards/android | |
| run: | | |
| chmod +x ./gradlew | |
| ./gradlew --no-daemon assembleDebug | |
| - name: Upload the APK | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: postcards-debug-apk | |
| path: apps/postcards/android/app/build/outputs/apk/debug/app-debug.apk | |
| if-no-files-found: error | |
| # Also publish it to the Releases page so it's downloadable without opening | |
| # the Actions run. One rolling prerelease ("debug-latest") holds the newest | |
| # build: delete + recreate so its tag always points at the current commit. | |
| # main only — feature-branch pushes still get the run artifact above. | |
| - name: Publish the APK to the rolling debug release | |
| if: github.ref == 'refs/heads/main' | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| run: | | |
| gh release delete debug-latest --yes --cleanup-tag 2>/dev/null || true | |
| gh release create debug-latest \ | |
| "apps/postcards/android/app/build/outputs/apk/debug/app-debug.apk#postcards-debug.apk" \ | |
| --title "Latest debug APK" \ | |
| --notes "Automated debug build from ${{ github.sha }}. Debug/unsigned — not for production." \ | |
| --prerelease \ | |
| --target "${{ github.sha }}" |