Skip to content

Commit 2321709

Browse files
Merge branch 'dev' into release
2 parents 5db1293 + 33e9d26 commit 2321709

127 files changed

Lines changed: 6823 additions & 1688 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.env.example renamed to .env.exmaple

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,7 @@ LINK_APP_STORE=https://apps.apple.com/us/app/your-app/idXXXXXXXXXX
3131
LINK_TEST_FLIGHT=https://testflight.apple.com/join/XXXXXXXX
3232
LINK_GITHUB=https://github.com/your-org/your-repo
3333
LINK_GOOGLE_PLAY=https://play.google.com/store/apps/details?id=com.example.yourapp
34+
35+
# App Settings
36+
UPDATE_FLOWLINE_PERIOD=100
37+
IS_TEST_MODE=false
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: "Create ENV file"
2+
description: "Generate .env from secrets & vars"
3+
4+
inputs:
5+
secret_blob:
6+
required: true
7+
var_blob:
8+
required: true
9+
10+
runs:
11+
using: composite
12+
steps:
13+
- name: Write .env (cross platform)
14+
shell: bash
15+
run: |
16+
INPUT_SECRET_BLOB='${{ inputs.secret_blob }}' \
17+
INPUT_VAR_BLOB='${{ inputs.var_blob }}' \
18+
node "$GITHUB_ACTION_PATH/writer.js"
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
const fs = require("fs");
2+
3+
const secrets = JSON.parse(process.env.INPUT_SECRET_BLOB || "{}");
4+
const vars = JSON.parse(process.env.INPUT_VAR_BLOB || "{}");
5+
6+
const data = `
7+
ANDROID_AD_APP_ID=${secrets.ANDROID_AD_APP_ID}
8+
ANDROID_AD_UNIT_ID=${secrets.ANDROID_AD_UNIT_ID}
9+
IOS_AD_APP_ID=${secrets.IOS_AD_APP_ID}
10+
IOS_AD_UNIT_ID=${secrets.IOS_AD_UNIT_ID}
11+
12+
FIREBASE_PROJECT_NUMBER=${secrets.FIREBASE_PROJECT_NUMBER}
13+
FIREBASE_PROJECT_ID=${secrets.FIREBASE_PROJECT_ID}
14+
15+
FIREBASE_ANDROID_API_KEY=${secrets.FIREBASE_ANDROID_API_KEY}
16+
FIREBASE_ANDROID_APP_ID=${secrets.FIREBASE_ANDROID_APP_ID}
17+
18+
FIREBASE_IOS_API_KEY=${secrets.FIREBASE_IOS_API_KEY}
19+
FIREBASE_IOS_APP_ID=${secrets.FIREBASE_IOS_APP_ID}
20+
21+
FIREBASE_WINDOWS_API_KEY=${secrets.FIREBASE_WINDOWS_API_KEY}
22+
FIREBASE_WINDOWS_APP_ID=${secrets.FIREBASE_WINDOWS_APP_ID}
23+
FIREBASE_WINDOWS_MEASUREMENT_ID=${secrets.FIREBASE_WINDOWS_MEASUREMENT_ID}
24+
25+
FIREBASE_WEB_API_KEY=${secrets.FIREBASE_WEB_API_KEY}
26+
FIREBASE_WEB_APP_ID=${secrets.FIREBASE_WEB_APP_ID}
27+
FIREBASE_WEB_MEASUREMENT_ID=${secrets.FIREBASE_WEB_MEASUREMENT_ID}
28+
29+
LINK_APP_STORE=${vars.LINK_APP_STORE}
30+
LINK_TEST_FLIGHT=${vars.LINK_TEST_FLIGHT}
31+
LINK_GITHUB=https://github.com/${process.env.GITHUB_REPOSITORY}
32+
LINK_GOOGLE_PLAY=${vars.LINK_GOOGLE_PLAY}
33+
34+
UPDATE_FLOWLINE_PERIOD=${secrets.UPDATE_FLOWLINE_PERIOD}
35+
`.trim() + "\n";
36+
37+
fs.writeFileSync(".env", data);
38+
39+
console.log("Generated .env file");
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: "Get App Version"
2+
description: "Reads version from pubspec.yaml"
3+
4+
runs:
5+
using: "composite"
6+
steps:
7+
- name: Run Python version extractor
8+
id: get_version
9+
shell: bash
10+
run: |
11+
VERSION=$(python3 "${{ github.action_path }}/get_version.py")
12+
echo "version=$VERSION" >> $GITHUB_OUTPUT
13+
14+
outputs:
15+
version:
16+
description: "App version (without +build)"
17+
value: ${{ steps.get_version.outputs.version }}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
version = None
2+
3+
with open("pubspec.yaml", "r", encoding="utf8") as f:
4+
for line in f:
5+
line = line.strip()
6+
if line.startswith("version:"):
7+
version = line.split("version:", 1)[1].strip().split("+")[0]
8+
break
9+
10+
if not version:
11+
raise Exception("Version not found in pubspec.yaml")
12+
13+
print(version)

.github/release_message.md

Lines changed: 31 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,4 @@
1-
## Defyx VPN RELEASE_TAG is now available
2-
3-
### Some software changes:
4-
5-
- [x] Fixed some minor bugs
6-
7-
<hr />
8-
9-
## Download
1+
## Defyx VPN release is now available!
102

113
<div align="left" id="download">
124
<table>
@@ -23,7 +15,7 @@
2315
<img src="https://img.shields.io/badge/iOS-Apple Store-F0F0F1.svg?logo=apple">
2416
</a>
2517
</td>
26-
<td>
18+
<td valign="top">
2719
15.6 or later
2820
</td>
2921
</tr>
@@ -32,28 +24,41 @@
3224
<a href="https://play.google.com/store/apps/details?id=de.unboundtech.defyxvpn" target="_blank">
3325
<img src="https://img.shields.io/badge/Android-Google Play-044d29.svg?logo=googleplay">
3426
</a>
27+
<br />
3528
<a href="https://github.com/UnboundTechCo/defyxVPN/releases/download/RELEASE_TAG/app-release.apk">
36-
<img src="https://img.shields.io/badge/Android-APK Universal-0d7365.svg?logo=android">
29+
<img src="https://img.shields.io/badge/APK-Universal-36a132.svg?logo=android">
30+
</a>
31+
<br />
32+
<a href="https://github.com/UnboundTechCo/defyxVPN/releases/download/RELEASE_TAG/app-arm64-v8a-release.apk">
33+
<img src="https://img.shields.io/badge/APK-ARMv8-36a132.svg?logo=android">
34+
</a>
35+
<br />
36+
<a href="https://github.com/UnboundTechCo/defyxVPN/releases/download/RELEASE_TAG/app-armeabi-v7a-release.apk">
37+
<img src="https://img.shields.io/badge/APK-ARMv7-36a132.svg?logo=android">
38+
</a>
39+
<br />
40+
<a href="https://github.com/UnboundTechCo/defyxVPN/releases/download/RELEASE_TAG/app-x86_64-release.apk">
41+
<img src="https://img.shields.io/badge/APK-x64-36a132.svg?logo=android">
3742
</a>
3843
</td>
39-
<td>8.0 or later</td>
44+
<td valign="top">8.0 or later</td>
4045
</tr>
4146
<tr>
4247
<td>
4348
<a href="https://apps.apple.com/us/app/defyx/id6746811872?platform=ipad" target="_blank">
4449
<img src="https://img.shields.io/badge/iPad-Apple Store-F0F0F1.svg?logo=apple">
4550
</a>
4651
</td>
47-
<td>
52+
<td valign="top">
4853
15.6 or later
4954
</td>
5055
</tr>
5156
<tr>
5257
<td>
5358
<img src="https://img.shields.io/badge/Windows-Upcoming-0C88D8.svg?logo=gitforwindows">
5459
</td>
55-
<td>
56-
-<br>
60+
<td valign="top">
61+
-
5762
</td>
5863
</tr>
5964
<tr>
@@ -62,15 +67,15 @@
6267
<img src="https://img.shields.io/badge/macOS-Apple Store-F0F0F1.svg?logo=apple">
6368
</a>
6469
</td>
65-
<td>
70+
<td valign="top">
6671
12.5 or later<br />Apple M1 chip or later
6772
</td>
6873
</tr>
6974
<tr>
7075
<td>
7176
<img src="https://img.shields.io/badge/Linux-Upcoming-DC470E.svg?logo=debian">
7277
</td>
73-
<td>
78+
<td valign="top">
7479
-
7580
</td>
7681
</tr>
@@ -80,6 +85,15 @@
8085

8186
<hr />
8287

88+
### What's Changed:
89+
90+
- [x] Fixed some minor bugs
91+
92+
<hr />
93+
94+
> [!NOTE]
95+
> To receive **pre-release Android versions**, simply join the **GooglePlay Beta Tester** program. For **pre-release iOS versions**, you can access them via **TestFlight**. All updates and announcements regarding these versions are shared through the [**Beta Tester group**](https://t.me/+KuigyCHadIpiNDhi). By joining this group, you can help us **identify and fix issues** in the app, contributing to a **better experience for all users**.
96+
8397
#### To report issues or provide suggestions:
8498

8599
https://github.com/UnboundTechCo/defyxVPN/issues

.github/workflows/android.yml

Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
on:
2+
workflow_call:
3+
4+
jobs:
5+
build-android:
6+
if: ${{ github.event.inputs.upload_to_app_store != 'true' }}
7+
runs-on: ubuntu-latest
8+
9+
steps:
10+
- name: Checkout
11+
uses: actions/checkout@v4
12+
13+
- name: Set up JDK
14+
uses: actions/setup-java@v4
15+
with:
16+
distribution: "temurin"
17+
java-version: "17"
18+
19+
- name: Accept Android SDK licenses
20+
run: yes | sudo "${ANDROID_HOME}/cmdline-tools/latest/bin/sdkmanager" --licenses
21+
22+
- name: Install NDK 29
23+
run: |
24+
yes | sudo "${ANDROID_HOME}/cmdline-tools/latest/bin/sdkmanager" --install "ndk;29.0.13846066"
25+
26+
- name: Force Gradle to use NDK 29 (absolute override)
27+
run: |
28+
echo "ndk.dir=${ANDROID_HOME}/ndk/29.0.13846066" >> android/local.properties
29+
echo "ndkVersion=29.0.13846066" >> android/local.properties
30+
31+
- name: Set up Flutter
32+
uses: subosito/flutter-action@v2
33+
with:
34+
flutter-version: "3.35.2"
35+
channel: "stable"
36+
architecture: "x64"
37+
cache: false
38+
39+
- name: Verify Flutter version
40+
run: |
41+
flutter --version
42+
dart --version
43+
flutter doctor --verbose
44+
45+
- name: Get dependencies
46+
run: flutter pub get
47+
48+
- name: Get app version
49+
id: get_version
50+
uses: ./.github/actions/get-version
51+
52+
- name: Clean Flutter & Gradle caches
53+
run: |
54+
flutter clean
55+
rm -rf ~/.gradle
56+
rm -rf android/.gradle
57+
58+
- name: Download Android Framework
59+
env:
60+
GITHUB_TOKEN: ${{ secrets.DXCORE_PRIVATE_ACCESS_TOKEN }}
61+
run: |
62+
mkdir -p android/app/libs
63+
curl -s -H "Authorization: token $GITHUB_TOKEN" \
64+
https://api.github.com/repos/UnboundTechCo/DXcore-private/releases/latest | tee api.json
65+
66+
ASSET_ID=$(curl -s -H "Authorization: token $GITHUB_TOKEN" \
67+
https://api.github.com/repos/UnboundTechCo/DXcore-private/releases/latest \
68+
| jq -r '.assets[] | select(.name == "DXcore-android.zip") | .id')
69+
echo "Asset ID: $ASSET_ID"
70+
curl -L \
71+
-H "Authorization: token $GITHUB_TOKEN" \
72+
-H "Accept: application/octet-stream" \
73+
"https://api.github.com/repos/UnboundTechCo/DXcore-private/releases/assets/$ASSET_ID" \
74+
-o android/app/libs/DXcore-android.zip
75+
cd android/app/libs
76+
unzip -o DXcore-android.zip
77+
mv build/android/* .
78+
rm DXcore-android.zip
79+
80+
- name: Generate .env
81+
uses: ./.github/actions/create-env
82+
with:
83+
secret_blob: ${{ toJson(secrets) }}
84+
var_blob: ${{ toJson(vars) }}
85+
86+
- name: Create key.properties for Android signing
87+
run: |
88+
echo "storePassword=${{ secrets.STORE_PASSWORD }}" > android/key.properties
89+
echo "keyPassword=${{ secrets.KEY_PASSWORD }}" >> android/key.properties
90+
echo "keyAlias=${{ secrets.KEY_ALIAS }}" >> android/key.properties
91+
echo "storeFile=keystore.jks" >> android/key.properties
92+
93+
- name: Decode and save Android keystore
94+
env:
95+
KEYSTORE_BASE64: ${{ secrets.KEYSTORE_BASE64 }}
96+
run: echo "$KEYSTORE_BASE64" | base64 -d > android/app/keystore.jks
97+
98+
- name: Build APK & Bundle
99+
run: |
100+
chmod +x scripts/build_release.sh
101+
bash scripts/build_release.sh <<EOF
102+
2
103+
4
104+
4
105+
EOF
106+
107+
- name: Upload artifact
108+
uses: actions/upload-artifact@v4
109+
with:
110+
name: android-release
111+
path: |
112+
build/app/outputs/flutter-apk/*.apk
113+
build/app/outputs/bundle/release/app-release.aab

0 commit comments

Comments
 (0)