Skip to content

Commit 275d647

Browse files
committed
fix: add fastlane deploy to firebase
1 parent 1dbfc64 commit 275d647

File tree

17 files changed

+244
-54
lines changed

17 files changed

+244
-54
lines changed

.github/workflows/firebase-deploy-ios.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,5 +70,5 @@ jobs:
7070
--app "1:915379517791:ios:ecfa47ab5ee5f256789eea" \
7171
--groups "leatherhood" \
7272
--token "${{ secrets.FIREBASE_TOKEN }}" \
73-
--release-notes "${{ steps.release.outputs.release_notes }}"
73+
--release-notes "New build available"
7474
shell: bash

.github/workflows/firebase-deploy.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -58,13 +58,13 @@ jobs:
5858
with:
5959
name: app-release
6060
path: ${{ github.workspace }}/app-release.apk
61-
- name: Run Release Please
62-
id: release
63-
uses: google-github-actions/release-please-action@v3
64-
with:
65-
token: ${{ secrets.GITHUB_TOKEN }}
66-
release-type: node
67-
package-name: leatherwalletmobile
61+
# - name: Run Release Please
62+
# id: release
63+
# uses: google-github-actions/release-please-action@v3
64+
# with:
65+
# token: ${{ secrets.GITHUB_TOKEN }}
66+
# release-type: node
67+
# package-name: leatherwalletmobile
6868

6969
- name: Install Firebase CLI
7070
run: npm install -g firebase-tools
@@ -77,7 +77,7 @@ jobs:
7777
--app "1:915379517791:android:d4e7cb446a612f8c789eea" \
7878
--groups "leatherhood" \
7979
--token "${{ secrets.FIREBASE_TOKEN }}" \
80-
--release-notes "${{ steps.release.outputs.release_notes }}"
80+
--release-notes "New build available"
8181
shell: bash
8282

8383
- name: Build iOS app
@@ -101,5 +101,5 @@ jobs:
101101
--app "1:915379517791:ios:ecfa47ab5ee5f256789eea" \
102102
--groups "leatherhood" \
103103
--token "${{ secrets.FIREBASE_TOKEN }}" \
104-
--release-notes "${{ steps.release.outputs.release_notes }}"
104+
--release-notes "New build available"
105105
shell: bash

apps/mobile/android/Gemfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
source "https://rubygems.org"
22

33
gem "fastlane"
4+
5+
plugins_path = File.join(File.dirname(__FILE__), 'fastlane', 'Pluginfile')
6+
eval_gemfile(plugins_path) if File.exist?(plugins_path)

apps/mobile/android/Gemfile.lock

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,10 @@ GEM
110110
xcodeproj (>= 1.13.0, < 2.0.0)
111111
xcpretty (~> 0.4.0)
112112
xcpretty-travis-formatter (>= 0.0.3, < 2.0.0)
113+
fastlane-plugin-firebase_app_distribution (0.10.0)
114+
google-apis-firebaseappdistribution_v1 (~> 0.3.0)
115+
google-apis-firebaseappdistribution_v1alpha (~> 0.2.0)
116+
fastlane-plugin-versioning (0.7.1)
113117
fastlane-sirp (1.0.0)
114118
sysrandom (~> 1.0)
115119
gh_inspector (1.1.3)
@@ -123,6 +127,10 @@ GEM
123127
representable (~> 3.0)
124128
retriable (>= 2.0, < 4.a)
125129
rexml
130+
google-apis-firebaseappdistribution_v1 (0.3.0)
131+
google-apis-core (>= 0.11.0, < 2.a)
132+
google-apis-firebaseappdistribution_v1alpha (0.2.0)
133+
google-apis-core (>= 0.11.0, < 2.a)
126134
google-apis-iamcredentials_v1 (0.17.0)
127135
google-apis-core (>= 0.11.0, < 2.a)
128136
google-apis-playcustomapp_v1 (0.13.0)
@@ -216,6 +224,8 @@ PLATFORMS
216224

217225
DEPENDENCIES
218226
fastlane
227+
fastlane-plugin-firebase_app_distribution
228+
fastlane-plugin-versioning
219229

220230
BUNDLED WITH
221231
2.1.4

apps/mobile/android/app/build.gradle

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -99,12 +99,17 @@ android {
9999
keyPassword 'android'
100100
}
101101
release {
102-
if (project.hasProperty('LEATHER_UPLOAD_STORE_FILE')) {
103-
storeFile file(LEATHER_UPLOAD_STORE_FILE)
104-
storePassword LEATHER_UPLOAD_STORE_PASSWORD
105-
keyAlias LEATHER_UPLOAD_KEY_ALIAS
106-
keyPassword LEATHER_UPLOAD_KEY_PASSWORD
107-
}
102+
103+
storeFile file('debug.keystore')
104+
storePassword 'android'
105+
keyAlias 'androiddebugkey'
106+
keyPassword 'android'
107+
// if (project.hasProperty('LEATHER_UPLOAD_STORE_FILE')) {
108+
// storeFile file(LEATHER_UPLOAD_STORE_FILE)
109+
// storePassword LEATHER_UPLOAD_STORE_PASSWORD
110+
// keyAlias LEATHER_UPLOAD_KEY_ALIAS
111+
// keyPassword LEATHER_UPLOAD_KEY_PASSWORD
112+
// }
108113
}
109114
}
110115
buildTypes {

apps/mobile/android/fastlane/Fastfile

Lines changed: 44 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,55 @@
1-
default_platform(:android)
1+
# default_platform(:android)
22

33
platform :android do
44
desc "Build and distribute Android app"
5-
lane :distribute_android do
5+
lane :build_android do
66
gradle(
77
task: "assembleRelease"
88
)
9+
end
10+
# lane :auto_increment_version do
11+
# # Increment the version code
12+
# increment_version_code(
13+
# gradle_file_path: "app/build.gradle" # Path to your build.gradle file
14+
# )
15+
16+
# # Increment the version name
17+
# increment_version_name(
18+
# gradle_file_path: "app/build.gradle", # Path to your build.gradle file
19+
# version_name: next_version_name # Function to determine the next version name
20+
# )
21+
# end
22+
23+
# def next_version_name
24+
# # Logic to determine the next version name
25+
# # For example, increment the patch version
26+
# current_version = get_version_name_from_gradle
27+
# version_parts = current_version.split(".")
28+
# version_parts[-1] = version_parts[-1].to_i + 1
29+
# version_parts.join(".")
30+
# end
31+
32+
# def get_version_name_from_gradle
33+
# # Logic to read the current version name from the build.gradle file
34+
# gradle_file = File.read("app/build.gradle")
35+
# match = gradle_file.match(/versionName "(\d+\.\d+\.\d+)"/)
36+
# match[1] if match
37+
# end
38+
lane :increment_version do
39+
increment_version_number(
40+
bump_type: "minor" # Options are: "patch", "minor", "major"
41+
)
42+
# Optionally, you can also increment the build number
43+
increment_build_number
44+
end
45+
46+
lane :distribute_android do
47+
build_android
48+
increment_version
949
firebase_app_distribution(
1050
app: "1:915379517791:android:d4e7cb446a612f8c789eea",
11-
group: "leatherhood",
12-
release_notes: "New build available"
51+
groups: "leatherhood",
52+
release_notes: "New pete available"
1353
)
1454
end
15-
16-
1755
end
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Autogenerated by fastlane
2+
#
3+
# Ensure this file is checked in to source control!
4+
5+
gem 'fastlane-plugin-firebase_app_distribution'
6+
gem 'fastlane-plugin-firebase_app_distribution'
7+
gem 'fastlane-plugin-versioning'
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
fastlane documentation
2+
----
3+
4+
# Installation
5+
6+
Make sure you have the latest version of the Xcode command line tools installed:
7+
8+
```sh
9+
xcode-select --install
10+
```
11+
12+
For _fastlane_ installation instructions, see [Installing _fastlane_](https://docs.fastlane.tools/#installing-fastlane)
13+
14+
# Available Actions
15+
16+
## Android
17+
18+
### android build_android
19+
20+
```sh
21+
[bundle exec] fastlane android build_android
22+
```
23+
24+
Build and distribute Android app
25+
26+
### android increment_version
27+
28+
```sh
29+
[bundle exec] fastlane android increment_version
30+
```
31+
32+
33+
34+
### android distribute_android
35+
36+
```sh
37+
[bundle exec] fastlane android distribute_android
38+
```
39+
40+
41+
42+
----
43+
44+
This README.md is auto-generated and will be re-generated every time [_fastlane_](https://fastlane.tools) is run.
45+
46+
More information about _fastlane_ can be found on [fastlane.tools](https://fastlane.tools).
47+
48+
The documentation of _fastlane_ can be found on [docs.fastlane.tools](https://docs.fastlane.tools).
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<testsuites>
3+
<testsuite name="fastlane.lanes">
4+
5+
6+
7+
8+
<testcase classname="fastlane.lanes" name="0: Switch to android build_android lane" time="0.000131">
9+
10+
</testcase>
11+
12+
13+
<testcase classname="fastlane.lanes" name="1: assembleRelease" time="14.545738">
14+
15+
</testcase>
16+
17+
18+
<testcase classname="fastlane.lanes" name="2: Switch to android increment_version lane" time="0.000139">
19+
20+
</testcase>
21+
22+
23+
<testcase classname="fastlane.lanes" name="3: increment_version_number" time="0.032691">
24+
25+
<failure message="/Users/petew/.rbenv/versions/2.7.6/lib/ruby/gems/2.7.0/gems/fastlane-2.226.0/fastlane/lib/fastlane/actions/actions_helper.rb:67:in `execute_action'&#10;/Users/petew/.rbenv/versions/2.7.6/lib/ruby/gems/2.7.0/gems/fastlane-2.226.0/fastlane/lib/fastlane/runner.rb:255:in `block in execute_action'&#10;/Users/petew/.rbenv/versions/2.7.6/lib/ruby/gems/2.7.0/gems/fastlane-2.226.0/fastlane/lib/fastlane/runner.rb:229:in `chdir'&#10;/Users/petew/.rbenv/versions/2.7.6/lib/ruby/gems/2.7.0/gems/fastlane-2.226.0/fastlane/lib/fastlane/runner.rb:229:in `execute_action'&#10;/Users/petew/.rbenv/versions/2.7.6/lib/ruby/gems/2.7.0/gems/fastlane-2.226.0/fastlane/lib/fastlane/runner.rb:157:in `trigger_action_by_name'&#10;/Users/petew/.rbenv/versions/2.7.6/lib/ruby/gems/2.7.0/gems/fastlane-2.226.0/fastlane/lib/fastlane/fast_file.rb:159:in `method_missing'&#10;Fastfile:39:in `block (2 levels) in parsing_binding'&#10;/Users/petew/.rbenv/versions/2.7.6/lib/ruby/gems/2.7.0/gems/fastlane-2.226.0/fastlane/lib/fastlane/lane.rb:41:in `call'&#10;/Users/petew/.rbenv/versions/2.7.6/lib/ruby/gems/2.7.0/gems/fastlane-2.226.0/fastlane/lib/fastlane/runner.rb:204:in `try_switch_to_lane'&#10;/Users/petew/.rbenv/versions/2.7.6/lib/ruby/gems/2.7.0/gems/fastlane-2.226.0/fastlane/lib/fastlane/runner.rb:146:in `trigger_action_by_name'&#10;/Users/petew/.rbenv/versions/2.7.6/lib/ruby/gems/2.7.0/gems/fastlane-2.226.0/fastlane/lib/fastlane/fast_file.rb:159:in `method_missing'&#10;Fastfile:48:in `block (2 levels) in parsing_binding'&#10;/Users/petew/.rbenv/versions/2.7.6/lib/ruby/gems/2.7.0/gems/fastlane-2.226.0/fastlane/lib/fastlane/lane.rb:41:in `call'&#10;/Users/petew/.rbenv/versions/2.7.6/lib/ruby/gems/2.7.0/gems/fastlane-2.226.0/fastlane/lib/fastlane/runner.rb:49:in `block in execute'&#10;/Users/petew/.rbenv/versions/2.7.6/lib/ruby/gems/2.7.0/gems/fastlane-2.226.0/fastlane/lib/fastlane/runner.rb:45:in `chdir'&#10;/Users/petew/.rbenv/versions/2.7.6/lib/ruby/gems/2.7.0/gems/fastlane-2.226.0/fastlane/lib/fastlane/runner.rb:45:in `execute'&#10;/Users/petew/.rbenv/versions/2.7.6/lib/ruby/gems/2.7.0/gems/fastlane-2.226.0/fastlane/lib/fastlane/lane_manager.rb:46:in `cruise_lane'&#10;/Users/petew/.rbenv/versions/2.7.6/lib/ruby/gems/2.7.0/gems/fastlane-2.226.0/fastlane/lib/fastlane/command_line_handler.rb:34:in `handle'&#10;/Users/petew/.rbenv/versions/2.7.6/lib/ruby/gems/2.7.0/gems/fastlane-2.226.0/fastlane/lib/fastlane/commands_generator.rb:110:in `block (2 levels) in run'&#10;/Users/petew/.rbenv/versions/2.7.6/lib/ruby/gems/2.7.0/gems/commander-4.6.0/lib/commander/command.rb:187:in `call'&#10;/Users/petew/.rbenv/versions/2.7.6/lib/ruby/gems/2.7.0/gems/commander-4.6.0/lib/commander/command.rb:157:in `run'&#10;/Users/petew/.rbenv/versions/2.7.6/lib/ruby/gems/2.7.0/gems/commander-4.6.0/lib/commander/runner.rb:444:in `run_active_command'&#10;/Users/petew/.rbenv/versions/2.7.6/lib/ruby/gems/2.7.0/gems/fastlane-2.226.0/fastlane_core/lib/fastlane_core/ui/fastlane_runner.rb:124:in `run!'&#10;/Users/petew/.rbenv/versions/2.7.6/lib/ruby/gems/2.7.0/gems/commander-4.6.0/lib/commander/delegates.rb:18:in `run!'&#10;/Users/petew/.rbenv/versions/2.7.6/lib/ruby/gems/2.7.0/gems/fastlane-2.226.0/fastlane/lib/fastlane/commands_generator.rb:363:in `run'&#10;/Users/petew/.rbenv/versions/2.7.6/lib/ruby/gems/2.7.0/gems/fastlane-2.226.0/fastlane/lib/fastlane/commands_generator.rb:43:in `start'&#10;/Users/petew/.rbenv/versions/2.7.6/lib/ruby/gems/2.7.0/gems/fastlane-2.226.0/fastlane/lib/fastlane/cli_tools_distributor.rb:123:in `take_off'&#10;/Users/petew/.rbenv/versions/2.7.6/lib/ruby/gems/2.7.0/gems/fastlane-2.226.0/bin/fastlane:23:in `&lt;top (required)&gt;'&#10;/Users/petew/.rbenv/versions/2.7.6/bin/fastlane:23:in `load'&#10;/Users/petew/.rbenv/versions/2.7.6/bin/fastlane:23:in `&lt;top (required)&gt;'&#10;/Users/petew/.rbenv/versions/2.7.6/lib/ruby/2.7.0/bundler/cli/exec.rb:63:in `load'&#10;/Users/petew/.rbenv/versions/2.7.6/lib/ruby/2.7.0/bundler/cli/exec.rb:63:in `kernel_load'&#10;/Users/petew/.rbenv/versions/2.7.6/lib/ruby/2.7.0/bundler/cli/exec.rb:28:in `run'&#10;/Users/petew/.rbenv/versions/2.7.6/lib/ruby/2.7.0/bundler/cli.rb:476:in `exec'&#10;/Users/petew/.rbenv/versions/2.7.6/lib/ruby/2.7.0/bundler/vendor/thor/lib/thor/command.rb:27:in `run'&#10;/Users/petew/.rbenv/versions/2.7.6/lib/ruby/2.7.0/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'&#10;/Users/petew/.rbenv/versions/2.7.6/lib/ruby/2.7.0/bundler/vendor/thor/lib/thor.rb:399:in `dispatch'&#10;/Users/petew/.rbenv/versions/2.7.6/lib/ruby/2.7.0/bundler/cli.rb:30:in `dispatch'&#10;/Users/petew/.rbenv/versions/2.7.6/lib/ruby/2.7.0/bundler/vendor/thor/lib/thor/base.rb:476:in `start'&#10;/Users/petew/.rbenv/versions/2.7.6/lib/ruby/2.7.0/bundler/cli.rb:24:in `start'&#10;/Users/petew/.rbenv/versions/2.7.6/lib/ruby/gems/2.7.0/gems/bundler-2.1.4/libexec/bundle:46:in `block in &lt;top (required)&gt;'&#10;/Users/petew/.rbenv/versions/2.7.6/lib/ruby/2.7.0/bundler/friendly_errors.rb:123:in `with_friendly_errors'&#10;/Users/petew/.rbenv/versions/2.7.6/lib/ruby/gems/2.7.0/gems/bundler-2.1.4/libexec/bundle:34:in `&lt;top (required)&gt;'&#10;/Users/petew/.rbenv/versions/2.7.6/bin/bundle:23:in `load'&#10;/Users/petew/.rbenv/versions/2.7.6/bin/bundle:23:in `&lt;main&gt;'&#10;&#10;Your current version () does not respect the format A or A.B or A.B.C" />
26+
27+
</testcase>
28+
29+
</testsuite>
30+
</testsuites>

apps/mobile/ios/Gemfile.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ GEM
110110
xcodeproj (>= 1.13.0, < 2.0.0)
111111
xcpretty (~> 0.4.0)
112112
xcpretty-travis-formatter (>= 0.0.3, < 2.0.0)
113-
fastlane-plugin-firebase_app_distribution (0.9.1)
113+
fastlane-plugin-firebase_app_distribution (0.10.0)
114114
google-apis-firebaseappdistribution_v1 (~> 0.3.0)
115115
google-apis-firebaseappdistribution_v1alpha (~> 0.2.0)
116116
fastlane-sirp (1.0.0)
@@ -162,7 +162,7 @@ GEM
162162
httpclient (2.8.3)
163163
jmespath (1.6.2)
164164
json (2.9.1)
165-
jwt (2.9.3)
165+
jwt (2.10.1)
166166
base64
167167
mini_magick (4.13.2)
168168
mini_mime (1.1.5)

apps/mobile/ios/Leather.app.dSYM.zip

28.8 MB
Binary file not shown.

apps/mobile/ios/fastlane/Fastfile

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,28 @@
11
platform :ios do
22
desc "Build and distribute iOS app"
3-
lane :distribute_ios do
3+
4+
lane :build_ios do
5+
match(type: "appstore", readonly: true)
46
build_app(
57
scheme: "leatherwalletmobile"
68
)
9+
end
10+
lane :increment_version do
11+
increment_version_number(
12+
bump_type: "patch" # Options are: "patch", "minor", "major"
13+
)
14+
# Optionally, you can also increment the build number
15+
increment_build_number
16+
end
17+
lane :distribute_ios do
18+
build_ios
19+
increment_version
720
firebase_app_distribution(
821
app: "1:915379517791:ios:ecfa47ab5ee5f256789eea",
922
groups: "leatherhood",
10-
release_notes: "New build available"
11-
)
23+
release_notes: "New will available",
24+
)
1225
end
1326

14-
lane :build do
15-
match(type: "development", readonly: true)
16-
gym(
17-
workspace: "YourApp.xcworkspace",
18-
scheme: "leatherwalletmobile",
19-
export_method: "app-store",
20-
export_options: {
21-
provisioningProfiles: {
22-
"io.leather.mobilewallet" => "leatherhood"
23-
}
24-
},
25-
xcargs: "-allowProvisioningUpdates"
26-
)
27-
end
2827
end
2928

apps/mobile/ios/fastlane/Matchfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ git_url("https://github.com/leather-io/mobile-signing-certificates")
22

33
storage_mode("git")
44

5-
type("development") # The default type, can be: appstore, adhoc, enterprise or development
5+
type("appstore") # The default type, can be: appstore, adhoc, enterprise or development
66

77
app_identifier(["io.leather.mobilewallet"])
88
# username("[email protected]") # Your Apple Developer Portal username

apps/mobile/ios/fastlane/README.md

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
fastlane documentation
2+
----
3+
4+
# Installation
5+
6+
Make sure you have the latest version of the Xcode command line tools installed:
7+
8+
```sh
9+
xcode-select --install
10+
```
11+
12+
For _fastlane_ installation instructions, see [Installing _fastlane_](https://docs.fastlane.tools/#installing-fastlane)
13+
14+
# Available Actions
15+
16+
## iOS
17+
18+
### ios build_ios
19+
20+
```sh
21+
[bundle exec] fastlane ios build_ios
22+
```
23+
24+
Build and distribute iOS app
25+
26+
### ios increment_version
27+
28+
```sh
29+
[bundle exec] fastlane ios increment_version
30+
```
31+
32+
33+
34+
### ios distribute_ios
35+
36+
```sh
37+
[bundle exec] fastlane ios distribute_ios
38+
```
39+
40+
41+
42+
----
43+
44+
This README.md is auto-generated and will be re-generated every time [_fastlane_](https://fastlane.tools) is run.
45+
46+
More information about _fastlane_ can be found on [fastlane.tools](https://fastlane.tools).
47+
48+
The documentation of _fastlane_ can be found on [docs.fastlane.tools](https://docs.fastlane.tools).

apps/mobile/ios/fastlane/report.xml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<testsuites>
3+
<testsuite name="fastlane.lanes">
4+
5+
6+
7+
</testsuite>
8+
</testsuites>

0 commit comments

Comments
 (0)