Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CD: Fastlane setup #837

Closed
wants to merge 14 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
chore: try publish expo build with firebase
pete-watters committed Jan 29, 2025

Verified

This commit was signed with the committer’s verified signature.
pete-watters Pete Watters
commit 385321b5b34567262d5c3ec1d630d732703e10ed
8 changes: 0 additions & 8 deletions .github/actions/eas-deploy-android/action.yml
Original file line number Diff line number Diff line change
@@ -98,11 +98,3 @@ runs:
eas build --platform android --profile=production --non-interactive --auto-submit
fastlane run distribute_android
shell: bash

- name: Firebase App Distribution
run: |
echo "${{ inputs.FIREBASE_TOKEN }}" > $HOME/.firebase_token
firebase appdistribution:distribute leather.apks --app "1:915379517791:android:d4e7cb446a612f8c789eea" --groups "leatherhood"
shell: bash
env:
FIREBASE_TOKEN: ${{ inputs.FIREBASE_TOKEN }}
73 changes: 73 additions & 0 deletions .github/workflows/firebase-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
name: Android Development Build

on:
push:
branches:
- '**'
workflow_dispatch:
inputs:
FIREBASE_TOKEN:
required: true
type: string

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Setup repo
uses: actions/checkout@v4

- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: '9.13.2'

- name: Setup node
uses: actions/setup-node@v3
with:
node-version: 20
registry-url: 'https://registry.npmjs.org/'
cache: 'pnpm'

- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'

- name: Setup Android SDK
uses: android-actions/setup-android@v3

- name: Setup Expo
uses: expo/expo-github-action@v8
with:
expo-version: latest
eas-version: latest
token: ${{ secrets.EXPO_TOKEN }}

- name: Install dependencies
run: pnpm install
shell: bash

- name: Build Android app
working-directory: ./apps/mobile
run: eas build --platform android --profile=simulator-dev --non-interactive --no-wait --local --output ${{ github.workspace }}/app-release.apk

- name: Upload APK artifact
uses: actions/upload-artifact@v4
with:
name: app-release
path: ${{ github.workspace }}/app-release.apk

- name: Install Firebase CLI
run: npm install -g firebase-tools

- name: Firebase App Distribution
env:
FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }}
run: |
firebase appdistribution:distribute ${{ github.workspace }}/app-release.apk \
--app "1:915379517791:android:d4e7cb446a612f8c789eea" \
--groups "leatherhood" \
--token "${{ secrets.FIREBASE_TOKEN }}"
shell: bash
4 changes: 1 addition & 3 deletions apps/mobile/android/Gemfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
source "https://rubygems.org"

git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }

gem "fastlane", "~> 2.226"
gem "fastlane"
4 changes: 2 additions & 2 deletions apps/mobile/android/Gemfile.lock
Original file line number Diff line number Diff line change
@@ -10,7 +10,7 @@ GEM
artifactory (3.0.17)
atomos (0.1.3)
aws-eventstream (1.3.0)
aws-partitions (1.1033.0)
aws-partitions (1.1034.0)
aws-sdk-core (3.214.1)
aws-eventstream (~> 1, >= 1.3.0)
aws-partitions (~> 1, >= 1.992.0)
@@ -215,7 +215,7 @@ PLATFORMS
ruby

DEPENDENCIES
fastlane (~> 2.226)
fastlane

BUNDLED WITH
2.1.4
33 changes: 0 additions & 33 deletions apps/mobile/android/fastlane/Fastfile
Original file line number Diff line number Diff line change
@@ -1,38 +1,5 @@
default_platform(:android)

# platform :android do
# desc "Deploy a new version to the Google Play Beta track"
# lane :beta do
# # Grab the latest build number from the Play Store
# previous_build_number = google_play_track_version_codes(
# track: "internal",
# json_key: ENV['GOOGLE_SERVICES_JSON']
# )[0]

# # Increment the build number

# # Build a release version of the app
# gradle(
# task: "clean assembleRelease",
# print_command: false,
# properties: {
# "android.injected.signing.store.file" => "#{Dir.pwd}/example-app.keystore",
# "android.injected.signing.store.password" => ENV["ANDROID_SIGNING_KEY_PASSWORD"],
# # replace alias with your signing key alias
# "android.injected.signing.key.alias" => "[example-app]",
# "android.injected.signing.key.password" => ENV["ANDROID_SIGNING_KEY_PASSWORD"],
# }
# )

# # Upload the app to the Play Store
# upload_to_play_store(
# track: "internal",
# json_key: ENV['GOOGLE_SERVICES_JSON']
# )
# end
# end

# original approach from the docs
platform :android do
desc "Build and distribute Android app"
lane :distribute_android do
4 changes: 2 additions & 2 deletions apps/mobile/ios/Gemfile.lock
Original file line number Diff line number Diff line change
@@ -174,7 +174,7 @@ GEM
optparse (0.6.0)
os (1.1.4)
plist (3.7.1)
public_suffix (6.0.1)
public_suffix (5.1.1)
rake (13.2.1)
representable (3.2.0)
declarative (< 0.1.0)
@@ -227,4 +227,4 @@ DEPENDENCIES
fastlane-plugin-firebase_app_distribution

BUNDLED WITH
2.5.23
2.4.22