Skip to content

Update & optimize CI workflow for App Store Connect compatibility #1330

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

Open
wants to merge 7 commits into
base: ffmpeg_kit
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
4 changes: 3 additions & 1 deletion .github/scripts/export-options.plist
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<key>destination</key>
<string>export</string>
<key>method</key>
<string>app-store</string>
<string>app-store-connect</string>
<key>provisioningProfiles</key>
<dict>
<key>technology.breez.client</key>
Expand All @@ -19,5 +19,7 @@
<string>F7R2LZH3W5</string>
<key>uploadSymbols</key>
<true/>
<key>compileBitcode</key>
<false/>
</dict>
</plist>
2 changes: 1 addition & 1 deletion .github/scripts/sign.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ altool="$(dirname "$(xcode-select -p)")/Developer/usr/bin/altool"
ipa="$PWD/build/Runner.app/breez.ipa"
export uploadCommand="put $ipa"
#sftp [email protected]:config/conf <<< $uploadCommand
"$altool" --upload-app --type ios --file "$ipa" --username $APP_USERNAME --password $APP_PASSWORD
"$altool" --verbose --upload-app --type ios --file "$ipa" --username $APP_USERNAME --password $APP_PASSWORD
103 changes: 50 additions & 53 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,98 +1,95 @@
# This is a basic workflow to help you get started with Actions

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 ]
branches: [ master, anytime_integration_new ]
pull_request:
branches: [ master,anytime_integration_new ]

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

# 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-15

# Steps represent a sequence of tasks that will be executed as part of the job

steps:
- name: Disk Cleanup
run: |
echo "::group::Free space before cleanup"
df -hI
echo "::endgroup::"
echo "::group::Cleaned Files"
sudo rm -rf /Users/runner/Library/Android/sdk
sudo rm -rf /Applications/Xcode_15.4.app
sudo rm -rf /Applications/Xcode_16.1.app
sudo rm -rf /Applications/Xcode_16.2.app
sudo rm -rf /Applications/Xcode_16.3_Release_Candidate_2.app
sudo rm -rf /Users/runner/Library/Android/sdk &
sudo rm -rf /Applications/Xcode_15.4.app &
sudo rm -rf /Applications/Xcode_16.1.app &
sudo rm -rf /Applications/Xcode_16.2.app &
sudo rm -rf /Applications/Xcode_16.3_Release_Candidate_2.app &
wait
echo "::endgroup::"
echo "::group::Free space after cleanup"
df -hI
echo "::endgroup::"

# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
- name: 🏗️ Check-out breezmobile repository
uses: actions/checkout@v4

- name: 🏗️ Setup Go
uses: actions/setup-go@v5
with:
go-version: '1.23.8'

- name: Install SSH key
- name: 🏗️ Setup Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: '3.7.12'
channel: 'stable'
cache: true

- name: 🔒 Install SSH Key
uses: shimataro/ssh-key-action@v2
with:
key: ${{ secrets.SSH_KEY }}
known_hosts: ${{ secrets.KNOWN_HOSTS }}
known_hosts: ${{ secrets.KNOWN_HOSTS }}

- name: add key
- name: 🔐 Add Keys
env:
CER_KEY_PASS: ${{ secrets.CER_KEY_PASS }}
PROVISIONING_PROFILE_BASE64: ${{ secrets.PROVISIONING_PROFILE_BASE64 }}
run: ./.github/scripts/add-key.sh

# Runs a set of commands using the runners shell
- name: Run a multi-line script
- name: 🏗️ Check-out Breez SDK repository
uses: actions/checkout@v4
with:
repository: breez/breez
path: breez

- name: 📦 Install Breez SDK dependencies
run: |
curl -o golang https://dl.google.com/go/go1.23.8.darwin-amd64.tar.gz
mkdir go1.23.8
tar -C $(pwd)/go1.23.8 -xzf golang
export PATH=$(pwd)/go1.23.8/go/bin:$PATH
export GOROOT=$(pwd)/go1.23.8/go
go version
brew update
git clone 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/[email protected]
echo "gomobile was installed!"
go install golang.org/x/mobile/cmd/[email protected]
echo "gobind was installed!"
echo $(ls $GOPATH/bin)
export PATH=$GOPATH/bin:$PATH

- name: 🔨 Build Breez SDK bindings
run: |
cd breez
export GOPRIVATE=github.com/btcsuite/btcd
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
git clone --branch 3.7.12 https://github.com/flutter/flutter.git
cp -r $GOPATH/src/github.com/breez/breez/build/ios/bindings.xcframework $GITHUB_WORKSPACE/ios/bindings.xcframework
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

- name: ⚙️ Setup configuration
run: |
cp -r $GITHUB_WORKSPACE/breez/build/ios/bindings.xcframework $GITHUB_WORKSPACE/ios/bindings.xcframework
rm -rf $GITHUB_WORKSPACE/conf
git clone [email protected]: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 [email protected]: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

- name: deploy
- name: 🚀 Build app
run: |
flutter clean
flutter build ios --no-codesign --no-tree-shake-icons

- name: 📱 Publish to TestFlight
env:
GOOGLE_SIGN_IN_URL: ${{ secrets.GOOGLE_SIGN_IN_URL }}
APP_USERNAME: ${{ secrets.APP_USERNAME }}
APP_PASSWORD: ${{ secrets.APP_PASSWORD }}
APP_PASSWORD: ${{ secrets.APP_PASSWORD }}
run: ./.github/scripts/sign.sh
18 changes: 18 additions & 0 deletions ios/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,7 @@
97C146EC1CF9000F007C117D /* Resources */,
3B06AD1E1E4923F5004D2608 /* Thin Binary */,
B8DC45DC7B6A71936FEF125E /* [CP] Embed Pods Frameworks */,
E87684232DC108F700393174 /* ShellScript */,
);
buildRules = (
);
Expand Down Expand Up @@ -466,6 +467,23 @@
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
E87684232DC108F700393174 /* ShellScript */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
);
outputFileListPaths = (
);
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "if [ -f \"${BUILT_PRODUCTS_DIR}/${FRAMEWORKS_FOLDER_PATH}/Tor.framework/Tor\" ]; then\n xcrun bitcode_strip -r \"${BUILT_PRODUCTS_DIR}/${FRAMEWORKS_FOLDER_PATH}/Tor.framework/Tor\" -o \"${BUILT_PRODUCTS_DIR}/${FRAMEWORKS_FOLDER_PATH}/Tor.framework/Tor\"\nfi\n";
};
/* End PBXShellScriptBuildPhase section */

/* Begin PBXSourcesBuildPhase section */
Expand Down
Loading