Skip to content
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
111 changes: 111 additions & 0 deletions .eas/workflows/deploy-production.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
name: Deploy to production

on:
push:
branches: ['main']

jobs:
fingerprint:
name: Fingerprint
environment: production
outputs:
android_fingerprint_hash: ${{ steps.fingerprint_android.outputs.hash }}
ios_fingerprint_hash: ${{ steps.fingerprint_ios.outputs.hash }}
steps:
- uses: eas/checkout
- uses: eas/install_node_modules
- id: fingerprint_android
name: Calculate Android fingerprint
run: |
HASH=$(npx @expo/fingerprint fingerprint:generate --platform android | jq -r '.hash')
echo "Android fingerprint: $HASH"
set-output hash "$HASH"
- id: fingerprint_ios
name: Calculate iOS fingerprint
run: |
HASH=$(npx @expo/fingerprint fingerprint:generate --platform ios | jq -r '.hash')
echo "iOS fingerprint: $HASH"
set-output hash "$HASH"

get_android_build:
name: Get Android build
needs: [fingerprint]
type: get-build
params:
fingerprint_hash: ${{ needs.fingerprint.outputs.android_fingerprint_hash }}
profile: production

get_ios_build:
name: Get iOS build
needs: [fingerprint]
type: get-build
params:
fingerprint_hash: ${{ needs.fingerprint.outputs.ios_fingerprint_hash }}
profile: production

sync_version:
name: Sync build version
needs: [get_android_build, get_ios_build]
if: ${{ !needs.get_ios_build.outputs.build_id || !needs.get_android_build.outputs.build_id }}
environment: production
steps:
- uses: eas/checkout
- uses: eas/install_node_modules
- id: sync
name: Increment and sync build number
run: |
npm install -g eas-cli

PROJECT_ID="737e4e9e-0a70-4685-b6cd-4ac3e91b0286"
APP_ID="com.helium.wallet.app"
STORE_VERSION=$(node -p "require('./package.json').version")

IOS_VERSION=$(eas build:version:get -p ios -e production --json --non-interactive 2>/dev/null | jq -r '.buildNumber // "0"') || IOS_VERSION="0"
ANDROID_VERSION=$(eas build:version:get -p android -e production --json --non-interactive 2>/dev/null | jq -r '.versionCode // "0"') || ANDROID_VERSION="0"

CURRENT_MAX=$(( IOS_VERSION > ANDROID_VERSION ? IOS_VERSION : ANDROID_VERSION ))
NEXT_VERSION=$(( CURRENT_MAX + 1 ))

echo "iOS: $IOS_VERSION, Android: $ANDROID_VERSION -> Next: $NEXT_VERSION"

for PLATFORM in IOS ANDROID; do
RESPONSE=$(curl -sf -X POST https://api.expo.dev/graphql \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $EXPO_TOKEN" \
-d "{\"query\":\"mutation(\$input:AppVersionInput!){appVersion{createAppVersion(appVersionInput:\$input){id}}}\",\"variables\":{\"input\":{\"appId\":\"$PROJECT_ID\",\"platform\":\"$PLATFORM\",\"applicationIdentifier\":\"$APP_ID\",\"storeVersion\":\"$STORE_VERSION\",\"buildVersion\":\"$NEXT_VERSION\"}}}")
echo "Set $PLATFORM version to $NEXT_VERSION: $RESPONSE"
done

build_android:
name: Build Android
needs: [get_android_build, sync_version]
if: ${{ !needs.get_android_build.outputs.build_id }}
type: build
params:
platform: android
profile: production

build_ios:
name: Build iOS
needs: [get_ios_build, sync_version]
if: ${{ !needs.get_ios_build.outputs.build_id }}
type: build
params:
platform: ios
profile: production

submit_android:
name: Submit Android
needs: [build_android]
type: submit
params:
build_id: ${{ needs.build_android.outputs.build_id }}
profile: production

submit_ios:
name: Submit iOS
needs: [build_ios]
type: submit
params:
build_id: ${{ needs.build_ios.outputs.build_id }}
profile: production
13 changes: 11 additions & 2 deletions app.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,18 @@
"react-native-ble-plx",
{
"isBackgroundEnabled": true,
"modes": ["peripheral", "central"],
"modes": [
"peripheral",
"central"
],
"bluetoothAlwaysPermission": "Allow $(PRODUCT_NAME) to connect to bluetooth devices"
}
]
]
],
"extra": {
"eas": {
"projectId": "737e4e9e-0a70-4685-b6cd-4ac3e91b0286"
}
},
"owner": "nova-labs"
}
28 changes: 28 additions & 0 deletions eas.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"cli": {
"version": ">= 18.0.5",
"appVersionSource": "remote"
},
"build": {
"development": {
"developmentClient": true,
"distribution": "internal"
},
"preview": {
"distribution": "internal"
},
"production": {
"autoIncrement": true
}
},
"submit": {
"production": {
"ios": {
"ascAppId": "1609525848"
},
"android": {
"track": "alpha"
}
}
}
}
33 changes: 14 additions & 19 deletions ios/HeliumWallet.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
9DB500B7285D341D009C8341 /* HeliumBalanceWidget.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9DB500B3285D341D009C8341 /* HeliumBalanceWidget.swift */; };
9DB500B8285D341D009C8341 /* HeliumBalanceWidgetProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9DB500B4285D341D009C8341 /* HeliumBalanceWidgetProvider.swift */; };
9DB50127285D885B009C8341 /* SmallWidgetViews.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9DB50126285D885B009C8341 /* SmallWidgetViews.swift */; };
9DCA365F28E6781D000F2A66 /* Charts in Frameworks */ = {isa = PBXBuildFile; productRef = 9DCA365E28E6781D000F2A66 /* Charts */; };
AABB000128E6781D000F2A66 /* SimpleCharts.swift in Sources */ = {isa = PBXBuildFile; fileRef = AABB000028E6781D000F2A66 /* SimpleCharts.swift */; };
9DE3051C28510B8E00E46F9B /* HeliumWalletWidgetBundle.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9DE3051B28510B8E00E46F9B /* HeliumWalletWidgetBundle.swift */; };
9DE3051E28510E3900E46F9B /* Utils.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9DE3051D28510E3900E46F9B /* Utils.swift */; };
9DE305212851187D00E46F9B /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 9DE305232851187D00E46F9B /* Localizable.strings */; };
Expand Down Expand Up @@ -161,6 +161,7 @@
9DB500B4285D341D009C8341 /* HeliumBalanceWidgetProvider.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HeliumBalanceWidgetProvider.swift; sourceTree = "<group>"; };
9DB50126285D885B009C8341 /* SmallWidgetViews.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SmallWidgetViews.swift; sourceTree = "<group>"; };
9DE3051B28510B8E00E46F9B /* HeliumWalletWidgetBundle.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HeliumWalletWidgetBundle.swift; sourceTree = "<group>"; };
AABB000028E6781D000F2A66 /* SimpleCharts.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SimpleCharts.swift; sourceTree = "<group>"; };
9DE3051D28510E3900E46F9B /* Utils.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Utils.swift; sourceTree = "<group>"; };
9DE305222851187D00E46F9B /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Localizable.strings; sourceTree = "<group>"; };
9DE3052628511C6600E46F9B /* ja */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ja; path = ja.lproj/Localizable.strings; sourceTree = "<group>"; };
Expand Down Expand Up @@ -204,7 +205,6 @@
962862732BDCCAF70073839C /* BuildFile in Frameworks */,
9D7DB3B02850EC14004D9409 /* SwiftUI.framework in Frameworks */,
9D7DB3AF2850EC14004D9409 /* WidgetKit.framework in Frameworks */,
9DCA365F28E6781D000F2A66 /* Charts in Frameworks */,
2188894242E2A9D6200928CF /* libPods-HeliumWalletWidgetExtension.a in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
Expand Down Expand Up @@ -353,6 +353,14 @@
path = API;
sourceTree = "<group>";
};
AABB000228E6781D000F2A66 /* Charts */ = {
isa = PBXGroup;
children = (
AABB000028E6781D000F2A66 /* SimpleCharts.swift */,
);
path = Charts;
sourceTree = "<group>";
};
9D7DB3B12850EC14004D9409 /* HeliumWalletWidget */ = {
isa = PBXGroup;
children = (
Expand All @@ -363,6 +371,7 @@
9D7DB3B52850EC15004D9409 /* Assets.xcassets */,
9D235EA229E5B0CB00749F56 /* API */,
9D1EF61D2861BFDF00E4A111 /* Jazzicon */,
AABB000228E6781D000F2A66 /* Charts */,
9D05C88228527CF5008198FC /* WalletWidget */,
9D05C88328527D02008198FC /* HNTBalanceWidget */,
9DE3051B28510B8E00E46F9B /* HeliumWalletWidgetBundle.swift */,
Expand Down Expand Up @@ -476,7 +485,6 @@
);
name = HeliumWalletWidgetExtension;
packageProductDependencies = (
9DCA365E28E6781D000F2A66 /* Charts */,
20D8E26035C09788368A96AB /* MapLibre */,
);
productName = HeliumWalletWidgetExtension;
Expand Down Expand Up @@ -507,7 +515,7 @@
};
};
};
buildConfigurationList = 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "heliumwallet" */;
buildConfigurationList = 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "HeliumWallet" */;
compatibilityVersion = "Xcode 13.0";
developmentRegion = en;
hasScannedForEncodings = 0;
Expand All @@ -519,7 +527,6 @@
);
mainGroup = 83CBB9F61A601CBA00E9B192;
packageReferences = (
9DCA365B28E67516000F2A66 /* XCRemoteSwiftPackageReference "swiftui-charts" */,
06CFEDB773A247562D147D60 /* XCRemoteSwiftPackageReference "maplibre-gl-native-distribution" */,
);
productRefGroup = 83CBBA001A601CBA00E9B192 /* Products */;
Expand Down Expand Up @@ -807,6 +814,7 @@
9D05C88B28527E6A008198FC /* HeliumWalletWidgetLargeView.swift in Sources */,
9D05C88728527E1E008198FC /* HeliumWalletWidgetSmallView.swift in Sources */,
9DF6297E28D1782D002601C9 /* HeliumTickerAccessoryRectangularView.swift in Sources */,
AABB000128E6781D000F2A66 /* SimpleCharts.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -1255,7 +1263,7 @@
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "heliumwallet" */ = {
83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "HeliumWallet" */ = {
isa = XCConfigurationList;
buildConfigurations = (
83CBBA201A601CBA00E9B192 /* Debug */,
Expand Down Expand Up @@ -1293,14 +1301,6 @@
version = 6.11.0;
};
};
9DCA365B28E67516000F2A66 /* XCRemoteSwiftPackageReference "swiftui-charts" */ = {
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/spacenation/swiftui-charts";
requirement = {
kind = upToNextMajorVersion;
minimumVersion = 1.0.0;
};
};
/* End XCRemoteSwiftPackageReference section */

/* Begin XCSwiftPackageProductDependency section */
Expand All @@ -1319,11 +1319,6 @@
package = 06CFEDB773A247562D147D60 /* XCRemoteSwiftPackageReference "maplibre-gl-native-distribution" */;
productName = MapLibre;
};
9DCA365E28E6781D000F2A66 /* Charts */ = {
isa = XCSwiftPackageProductDependency;
package = 9DCA365B28E67516000F2A66 /* XCRemoteSwiftPackageReference "swiftui-charts" */;
productName = Charts;
};
/* End XCSwiftPackageProductDependency section */
};
rootObject = 83CBB9F71A601CBA00E9B192 /* Project object */;
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading