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

feat: upload android apk #1943

Merged
merged 1 commit into from
Feb 3, 2024
Merged
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
18 changes: 18 additions & 0 deletions .github/workflows/android-fastlane.yml
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,24 @@ jobs:
ORACLE_PUBKEY: ${{ inputs.oracle_pubkey }}
RGS_SERVER_URL: ${{ inputs.rgs_server_url }}

- name: Build Android APK
id: build-android
run: |
NETWORK=$NETWORK just build-android-app-apk
env:
ESPLORA_ENDPOINT: ${{ inputs.esplora_endpoint }}
COORDINATOR_P2P_ENDPOINT: ${{ inputs.coordinator_p2p_endpoint }}
NETWORK: ${{ inputs.network }}
COORDINATOR_PORT_HTTP: ${{ inputs.coordinator_port_http }}
ORACLE_ENDPOINT: ${{ inputs.oracle_endpoint }}
ORACLE_PUBKEY: ${{ inputs.oracle_pubkey }}
RGS_SERVER_URL: ${{ inputs.rgs_server_url }}

- uses: actions/upload-artifact@v4
with:
name: apks
path: build/app/outputs/flutter-apk/

- name: Release to Google Play Store
env:
# secrets
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Fix: Add reject dlc channel, settle and renew offer
- Chore: Change pending offer policy to reject on reconnect
- Fix: Prevent proposing another dlc channel offer if there is already a pending one
- Feat: upload APKs as artifact to GitHub

## [1.8.4] - 2024-01-31

Expand Down
33 changes: 33 additions & 0 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -571,6 +571,39 @@ build-android-app-bundle:
--dart-define="RGS_SERVER_URL=${RGS_SERVER_URL}" \
"${flavor_arg[@]}"

build-android-app-apk:
#!/usr/bin/env bash
BUILD_NAME=$(yq -r .version {{pubspec}})
BUILD_NUMBER=$(git rev-list HEAD --count)
echo "build name: ${BUILD_NAME}"
echo "build number: ${BUILD_NUMBER}"

flavor_arg=()
if [ "$NETWORK" = "regtest" ]; then
flavor_arg+=(--flavor demo)
else
flavor_arg+=(--flavor full)
fi

# Replacing package id using the env variable.
os={{os()}}
echo "building on '$os' for '$NETWORK'"

cd mobile && flutter build apk --split-per-abi \
--build-name=${BUILD_NAME} \
--build-number=${BUILD_NUMBER} \
--release \
--dart-define="ESPLORA_ENDPOINT=${ESPLORA_ENDPOINT}" \
--dart-define="COORDINATOR_P2P_ENDPOINT=${COORDINATOR_P2P_ENDPOINT}" \
--dart-define="NETWORK=${NETWORK}" \
--dart-define="COMMIT=$(git rev-parse HEAD)" \
--dart-define="BRANCH=$(git rev-parse --abbrev-ref HEAD)" \
--dart-define="COORDINATOR_PORT_HTTP=${COORDINATOR_PORT_HTTP}" \
--dart-define="ORACLE_ENDPOINT=${ORACLE_ENDPOINT}" \
--dart-define="ORACLE_PUBKEY=${ORACLE_PUBKEY}" \
--dart-define="RGS_SERVER_URL=${RGS_SERVER_URL}" \
"${flavor_arg[@]}"

upload-app-bundle:
#!/usr/bin/env bash

Expand Down
Loading