diff --git a/.github/workflows/catsky-release.yml b/.github/workflows/catsky-release.yml new file mode 100644 index 000000000..f965dd8be --- /dev/null +++ b/.github/workflows/catsky-release.yml @@ -0,0 +1,76 @@ +name: Release Catsky +on: workflow_dispatch # could be weekly/etc or on a separate branch. + +jobs: + build-android: + name: Build Catsky for Android + runs-on: ubuntu-latest + outputs: + apk-path: ${{ steps.upload-artifact.outputs.artifact-path }} + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-node@v4 + with: + node-version: 20 + cache: yarn + + - uses: actions/setup-java@v4 + with: + java-version: 17 + distribution: temurin + cache: gradle + + - uses: android-actions/setup-android@v3 + + - uses: extractions/setup-just@v2 + + - name: Install dependencies + run: yarn install --frozen-lockfile + + - name: Copy example build settings + run: | + cp .env.example .env + cp google-services.json.example google-services.json + + - name: Build APK + run: just dist-build-android-gradle + + - name: Upload APK artifact + id: upload-artifact + uses: actions/upload-artifact@v4 + with: + name: android + path: android/app/build/outputs/apk/release/app-release.apk + + release: + name: Create GitHub Release + needs: build-android + runs-on: ubuntu-latest + steps: + - name: Download APK artifact + uses: actions/download-artifact@v4 + with: + name: android + path: . + + - name: Create GitHub Release + id: create_release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: catsky-v${{ github.run_number }} + release_name: Catsky v${{ github.run_number }} + draft: false + prerelease: false + + - name: Upload APK to Release + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: ./app-release.apk + asset_name: app-release.apk + asset_content_type: application/vnd.android.package-archive diff --git a/README.md b/README.md index c17e992c5..ca8cdd0a5 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,10 @@ Get the app itself: - **Web: bsky.app** + + + ## Development Resources This is a [React Native](https://reactnative.dev/) application, written in the TypeScript programming language. It builds on the `atproto` TypeScript packages (like [`@atproto/api`](https://www.npmjs.com/package/@atproto/api)), which are also open source, but in [a different git repository](https://github.com/bluesky-social/atproto). diff --git a/docs/android-builds.md b/docs/android-builds.md new file mode 100644 index 000000000..4432e8e92 --- /dev/null +++ b/docs/android-builds.md @@ -0,0 +1,6 @@ +# Android CI builds + +Android builds are done via CI to avoid EAS (expo) and are published via releases to avoid artifact expiry and allow [obtainium](https://obtainium.imranr.dev/) to download and auto-update the app. + +- "Catsky build" is for testing/etc NOT for release as these artifacts will expiry and won't be pushed out to obtainium users +- "Catsky release" is for production and will be pushed out to obtainium users and artifacts won't expire