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

Feature updates #14

Open
wants to merge 10 commits into
base: clovrwallet-develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
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
31 changes: 0 additions & 31 deletions .github/scripts/add-key.sh

This file was deleted.

6 changes: 3 additions & 3 deletions .github/scripts/export-options.plist
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@
<string>app-store</string>
<key>provisioningProfiles</key>
<dict>
<key>technology.breez.client</key>
<string>BREEZ-APP-STORE</string>
<key>com.clovrlabs.wallet</key>
<string>ClovrLabs Wallet</string>
</dict>
<key>signingCertificate</key>
<string>Apple Distribution</string>
<key>signingStyle</key>
<string>manual</string>
<key>teamID</key>
<string>F7R2LZH3W5</string>
<string>SET_TEAMID!!!!!!</string>
<key>uploadSymbols</key>
<true/>
</dict>
Expand Down
23 changes: 0 additions & 23 deletions .github/scripts/sign.sh

This file was deleted.

170 changes: 98 additions & 72 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,83 +1,109 @@
# This is a basic workflow to help you get started with Actions
# main.yml
name: CD

name: CI

# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches: [ master,anytime_integration_new ]
pull_request:
branches: [ master,anytime_integration_new ]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
branches: [ master ]

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: macOS-latest

# Steps represent a sequence of tasks that will be executed as part of the job
deploy_android:
name: Upload Android build to the Firebase
runs-on: ubuntu-latest
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2

- name: Install SSH key
uses: shimataro/ssh-key-action@v2
- name: Checkout code
uses: actions/checkout@v2
- name: Setup Java
uses: actions/setup-java@v1
with:
key: ${{ secrets.SSH_KEY }}
known_hosts: ${{ secrets.KNOWN_HOSTS }}

- name: add key
java-version: 12.x
- name: Setup Flutter
uses: subosito/flutter-action@v1
with:
flutter-version: '3.7.3'
- name: Install Flutter dependencies
run: flutter pub get
- name: Google Service
env:
CER_KEY_PASS: ${{ secrets.CER_KEY_PASS }}
run: ./.github/scripts/add-key.sh

# Runs a set of commands using the runners shell
- name: Run a multi-line script
GCP_SERVICE_ACCOUNT_ANDROID: ${{ secrets.GCP_SERVICE_ACCOUNT_ANDROID }}
run: |
echo $GCP_SERVICE_ACCOUNT_ANDROID | base64 --decode > ./android/app/google-services.json
shell: bash
- name: Prepare key
env:
ANDROID_KEY_JKS: ${{ secrets.ANDROID_KEY_JKS }}
run: |
curl -o golang https://dl.google.com/go/go1.19.2.darwin-amd64.tar.gz
mkdir go1.19.2
tar -C $(pwd)/go1.19.2 -xzf golang
export PATH=$(pwd)/go1.19.2/go/bin:$PATH
export GOROOT=$(pwd)/go1.19.2/go
go version
brew update
brew install bazaar
git clone --branch lnd-merge-0.15.1 https://github.com/breez/breez.git gopath/src/github.com/breez/breez
export TMP_GOPATH=$(pwd)/gopath
pushd gopath/src/github.com/breez/breez
export GOPRIVATE=github.com/btcsuite/btcd
export GOPATH=$TMP_GOPATH
echo "gopath= $GOPATH"
go install golang.org/x/mobile/cmd/gomobile@latest
echo "gomobile was installed!"
go install golang.org/x/mobile/cmd/gobind@latest
echo "gobind was installed!"
echo $(ls $GOPATH/bin)
export PATH=$GOPATH/bin:$PATH
mkdir -p build/ios
PATH=$PATH:$GOPATH/bin gomobile bind -iosversion=12.4 -target=ios -tags="ios experimental signrpc walletrpc chainrpc invoicesrpc routerrpc backuprpc peerrpc submarineswaprpc breezbackuprpc" -o build/ios/bindings.xcframework -ldflags="-s -w" github.com/breez/breez/bindings
popd
brew install ideviceinstaller ios-deploy
git clone --branch stable https://github.com/flutter/flutter.git
cp -r $GOPATH/src/github.com/breez/breez/build/ios/bindings.xcframework/ios-arm64/Bindings.framework $GITHUB_WORKSPACE/ios/bindings.framework
rm -rf $GITHUB_WORKSPACE/conf
git clone builderfiles@packages.breez.technology:configuration -b production $GITHUB_WORKSPACE/temp_config
cp -r $GITHUB_WORKSPACE/temp_config/conf $GITHUB_WORKSPACE/conf
echo "ls conf ***"
ls $GITHUB_WORKSPACE/conf
cat $GITHUB_WORKSPACE/conf/breez.conf
sftp builderfiles@packages.breez.technology:config/conf/GoogleService-Info.plist $GITHUB_WORKSPACE/ios/Runner/GoogleService-Info.plist
./flutter/bin/flutter clean
./flutter/bin/flutter build ios --no-codesign --no-tree-shake-icons
echo $ANDROID_KEY_JKS | base64 --decode > ./android/key.jks
shell: bash
- name: Prepare properties
env:
KEY_PROPERTIES: ${{ secrets.KEY_PROPERTIES }}
run: |
echo $KEY_PROPERTIES | base64 --decode > ./android/key.properties
shell: bash
- name: Build Android Release
run: flutter build apk --target-platform=android-arm64 --flavor=client --release
- name: upload artifact to Firebase App Distribution
uses: wzieba/Firebase-Distribution-Github-Action@v1
with:
appId: ${{secrets.FIREBASE_APP_ID_ANDROID}}
serviceCredentialsFileContent: ${{ secrets.CREDENTIAL_FILE_CONTENT }}
groups_file: tester,
file: build/app/outputs/flutter-apk/app-client-release.apk
env:
FIREBASE_APP_ID_ANDROID: '${{ secrets.FIREBASE_APP_ID_ANDROID }}'
CREDENTIAL_FILE_CONTENT: '${{ secrets.CREDENTIAL_FILE_CONTENT }}'
- name: Post to a Slack channel
id: slack
uses: slackapi/slack-github-action@v1.23.0
with:
channel-id: ${{secrets.CHANNEL_ID}}
slack-message: "New Android build is ready. You can download on the Firebase"
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}

- name: deploy
deploy_ios:
name: Upload iOS build to the TestFlight
runs-on: macOS-latest
steps:
- name: Checkout code from ref
uses: actions/checkout@v2
with:
ref: ${{ github.ref }}
- name: Google Service
env:
GCP_SERVICE_ACCOUNT: ${{ secrets.GCP_SERVICE_ACCOUNT }}
run: |
echo $GCP_SERVICE_ACCOUNT | base64 --decode > ./ios/Runner/GoogleService-Info.plist
shell: bash
- name: Run Flutter tasks
uses: subosito/flutter-action@v2
with:
flutter-version: '3.7.3'
- run: flutter clean
- run: flutter pub get
- run: flutter build ios --release --no-codesign
- name: Deploy iOS Beta to TestFlight via Fastlane
uses: maierj/fastlane-action@v1.4.0
with:
lane: closed_beta
subdirectory: ios
env:
ITC_TEAM_ID: '${{ secrets.ITC_TEAM_ID }}'
APPLICATON_ID: '${{ secrets.APPLICATON_ID }}'
BUNDLE_IDENTIFIER: '${{ secrets.BUNDLE_IDENTIFIER }}'
DEVELOPER_PORTAL_TEAM_ID: '${{ secrets.DEVELOPER_PORTAL_TEAM_ID }}'
FASTLANE_APPLE_ID: '${{ secrets.FASTLANE_APPLE_EMAIL_ID }}'
FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD: '${{ secrets.APP_SPECIFIC_PASSWORD }}'
MATCH_PASSWORD: '${{ secrets.MATCH_PASSWORD }}'
GIT_AUTHORIZATION: '${{ secrets.GIT_AUTHORIZATION }}'
PROVISIONING_PROFILE_SPECIFIER: '${{ secrets.PROVISIONING_PROFILE_SPECIFIER }}'
TEMP_KEYCHAIN_PASSWORD: '${{ secrets.TEMP_KEYCHAIN_PASSWORD }}'
TEMP_KEYCHAIN_USER: '${{ secrets.TEMP_KEYCHAIN_USER }}'
- name: Post to a Slack channel
id: slack
uses: slackapi/slack-github-action@v1.23.0
with:
channel-id: ${{secrets.CHANNEL_ID}}
slack-message: "New iOS build is ready. You can download on the TestFlight"
env:
GOOGLE_SIGN_IN_URL: ${{ secrets.GOOGLE_SIGN_IN_URL }}
APP_USERNAME: ${{ secrets.APP_USERNAME }}
APP_PASSWORD: ${{ secrets.APP_PASSWORD }}
run: ./.github/scripts/sign.sh
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -127,4 +127,5 @@ app.*.symbols
!**/ios/**/default.pbxuser
!**/ios/**/default.perspectivev3
!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages
!/dev/ci/**/Gemfile.lock
!/dev/ci/**/Gemfile.lock
/ios/Podfile
6 changes: 6 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# frozen_string_literal: true

source "https://rubygems.org"

# gem "rails"
gem 'fastlane'
12 changes: 6 additions & 6 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ android {
minSdkVersion 24
targetSdkVersion 33
multiDexEnabled true
versionCode 7
versionName "1.0.3"
versionCode 9
versionName "1.0.4"
}

signingConfigs {
Expand All @@ -53,7 +53,7 @@ android {

buildTypes {
debug {
// applicationIdSuffix ''
// signingConfig signingConfigs.release
versionNameSuffix '-DEBUG'
resValue "string", "app_name", "Clovrlabs Wallet Debug"
}
Expand All @@ -64,13 +64,13 @@ android {
}
}

flavorDimensions "breez"
flavorDimensions "clovr"
productFlavors {
development{
dimension "breez"
dimension "dev"
}
client {
dimension "breez"
dimension "clovr"
}
}

Expand Down
Binary file added android/app/libs/breez.aar
Binary file not shown.
2 changes: 2 additions & 0 deletions android/fastlane/Appfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
json_key_file("") # Path to the json secret file - Follow https://docs.fastlane.tools/actions/supply/#setup to get one
package_name("com.clovrlabs.wallet") # e.g. com.krausefx.app
23 changes: 23 additions & 0 deletions android/fastlane/Fastfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
default_platform(:android)

platform :android do
desc "Deploy to closed beta track"
lane :upload_to_play_store do
begin
gradle(task: "clean")
gradle(
task: "bundle",
build_type: 'Release'
)
upload_to_play_store(
track: 'production',
aab: '../build/app/outputs/bundle/release/app-release.aab',
skip_upload_metadata: true,
skip_upload_images: true,
skip_upload_screenshots: true,
release_status: "draft",
version_code: flutter_version()["version_code"],
)
end
end
end
7 changes: 7 additions & 0 deletions android/fastlane/Pluginfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Autogenerated by fastlane
#
# Ensure this file is checked in to source control!

gem 'fastlane-plugin-firebase_app_distribution'
gem 'fastlane-plugin-load_json'
gem 'fastlane-plugin-increment_version_code'
1 change: 1 addition & 0 deletions android/fastlane/groups.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
alex.karpenko@clovrlabs.com,
Binary file added ios/Bindings.framework/Bindings
Binary file not shown.
13 changes: 13 additions & 0 deletions ios/Bindings.framework/Headers/Bindings.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@

// Objective-C API for talking to the following Go packages
//
// github.com/breez/breez/bindings
//
// File is generated by gomobile bind. Do not edit.
#ifndef __Bindings_FRAMEWORK_H__
#define __Bindings_FRAMEWORK_H__

#include "Bindings.objc.h"
#include "Universe.objc.h"

#endif
Loading