new: make better ci and building applications
This commit is contained in:
63
.github/workflows/ci.yml
vendored
63
.github/workflows/ci.yml
vendored
@@ -8,8 +8,34 @@ on:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
continue-on-error: true
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- platform: android
|
||||||
|
os: ubuntu-latest
|
||||||
|
targets: aab,apk
|
||||||
|
|
||||||
|
- platform: windows
|
||||||
|
os: windows-latest
|
||||||
|
targets: exe
|
||||||
|
|
||||||
|
- platform: linux
|
||||||
|
os: ubuntu-latest
|
||||||
|
targets: appimage
|
||||||
|
|
||||||
|
- platform: macos
|
||||||
|
os: macos-latest
|
||||||
|
targets: dmg
|
||||||
|
|
||||||
|
- platform: ios
|
||||||
|
os: macos-latest
|
||||||
|
targets: ipa
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: checkout
|
- name: checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
@@ -29,12 +55,14 @@ jobs:
|
|||||||
platform: x64
|
platform: x64
|
||||||
|
|
||||||
- name: Setup Java
|
- name: Setup Java
|
||||||
|
if: ${{ matrix.platform }} == "android"
|
||||||
uses: actions/setup-java@v3
|
uses: actions/setup-java@v3
|
||||||
with:
|
with:
|
||||||
distribution: "zulu"
|
distribution: "zulu"
|
||||||
java-version: 11
|
java-version: 11
|
||||||
|
|
||||||
- name: Setup Android SDK
|
- name: Setup Android SDK
|
||||||
|
if: ${{ matrix.platform }} == "android"
|
||||||
uses: android-actions/setup-android@v2
|
uses: android-actions/setup-android@v2
|
||||||
|
|
||||||
- name: Get Dependencies
|
- name: Get Dependencies
|
||||||
@@ -46,27 +74,24 @@ jobs:
|
|||||||
make gen
|
make gen
|
||||||
make translate
|
make translate
|
||||||
|
|
||||||
- name: Generate Libs
|
- name: Generate Android Libs
|
||||||
|
if: ${{ matrix.platform }} == "android"
|
||||||
run: |
|
run: |
|
||||||
make android-libs windows-libs
|
make android-libs
|
||||||
|
|
||||||
- name: Release Android
|
- name: Generate Windows Libs
|
||||||
|
if: ${{ matrix.platform }} == "windows"
|
||||||
run: |
|
run: |
|
||||||
make release-android
|
make windows-libs
|
||||||
find ./ -type f -name "*.apk" -exec cp {} . \;
|
|
||||||
|
- name: Release ${{ matrix.platform }}
|
||||||
|
run: |
|
||||||
|
make ${{ matrix.platform }}-libs
|
||||||
|
make ${{ matrix.platform }}-release
|
||||||
|
mkdir out
|
||||||
|
find ./ -type f -name "$(echo '*.${{ matrix.targets }}'| tr ',' ' ')" -exec cp {} out \;
|
||||||
|
|
||||||
- uses: actions/upload-artifact@v3
|
- uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: apk
|
name: ${{ matrix.platform }}
|
||||||
path: ./*.apk
|
path: ./out
|
||||||
|
|
||||||
- name: Release Windows
|
|
||||||
run: |
|
|
||||||
dart pub global activate flutter_distributor
|
|
||||||
flutter_distributor package --platform windows --targets exe
|
|
||||||
find ./ -type f -name "*.exe" -exec cp {} . \;
|
|
||||||
|
|
||||||
- uses: actions/upload-artifact@v3
|
|
||||||
with:
|
|
||||||
name: exe
|
|
||||||
path: ./*.exe
|
|
||||||
48
Makefile
48
Makefile
@@ -9,8 +9,48 @@ gen:
|
|||||||
translate:
|
translate:
|
||||||
dart run slang
|
dart run slang
|
||||||
|
|
||||||
android-libs: android-x64 android-arm android-arm64
|
|
||||||
|
|
||||||
|
android-release:
|
||||||
|
flutter build apk --target-platform android-arm,android-arm64,android-x64 --split-per-abi
|
||||||
|
|
||||||
|
windows-release:
|
||||||
|
dart pub global activate flutter_distributor
|
||||||
|
flutter_distributor package --platform windows --targets exe
|
||||||
|
|
||||||
|
|
||||||
|
linux-release:
|
||||||
|
dart pub global activate flutter_distributor
|
||||||
|
which locate
|
||||||
|
if [ $? =! 0 ];then
|
||||||
|
sudo apt install locate
|
||||||
|
fi
|
||||||
|
which appimagetool
|
||||||
|
if [ $? =! 0 ];then
|
||||||
|
wget -O appimagetool "https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage"
|
||||||
|
chmod +x appimagetool
|
||||||
|
mv appimagetool /usr/local/bin/
|
||||||
|
fi
|
||||||
|
flutter_distributor package --platform linux --targets appimage
|
||||||
|
|
||||||
|
macos-release:
|
||||||
|
dart pub global activate flutter_distributor
|
||||||
|
npm install -g appdmg
|
||||||
|
flutter_distributor package --platform macos --targets dmg
|
||||||
|
|
||||||
|
ios-release:
|
||||||
|
flutter_distributor package --platform ios --targets ipa --build-export-options-plist ios/exportOptions.plist
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
android-libs: android-x64 android-arm android-arm64
|
||||||
android-x64:
|
android-x64:
|
||||||
cd core && env GOOS=android GOARCH=amd64 CC=$(NDK_BIN)/x86_64-linux-android21-clang $(GOBUILD) -o $(ANDROID_OUT)/x86_64/libclash.so # building android x64 clash libs
|
cd core && env GOOS=android GOARCH=amd64 CC=$(NDK_BIN)/x86_64-linux-android21-clang $(GOBUILD) -o $(ANDROID_OUT)/x86_64/libclash.so # building android x64 clash libs
|
||||||
|
|
||||||
@@ -23,5 +63,7 @@ android-arm64:
|
|||||||
windows-libs:
|
windows-libs:
|
||||||
cd core && env GOOS=windows GOARCH=amd64 CC=x86_64-w64-mingw32-gcc $(GOBUILD) -o dist/libclash.dll # building windows clash libs
|
cd core && env GOOS=windows GOARCH=amd64 CC=x86_64-w64-mingw32-gcc $(GOBUILD) -o dist/libclash.dll # building windows clash libs
|
||||||
|
|
||||||
release-android:
|
|
||||||
flutter build apk --target-platform android-arm,android-arm64,android-x64 --split-per-abi
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -6,9 +6,56 @@ releases:
|
|||||||
package:
|
package:
|
||||||
platform: windows
|
platform: windows
|
||||||
target: exe
|
target: exe
|
||||||
- name: release-android-bundle
|
|
||||||
|
- name: release-android-apk
|
||||||
package:
|
package:
|
||||||
platform: android
|
platform: android
|
||||||
target: apk
|
target: apk
|
||||||
build_args:
|
build_args:
|
||||||
target-platform: android-arm,android-arm64,android-x64
|
target-platform: android-arm,android-arm64,android-x64
|
||||||
|
|
||||||
|
- name: release-android-bundle
|
||||||
|
package:
|
||||||
|
platform: android
|
||||||
|
target: aab
|
||||||
|
build_args:
|
||||||
|
target-platform: android-arm,android-arm64,android-x64
|
||||||
|
|
||||||
|
|
||||||
|
- name: release-linux
|
||||||
|
package:
|
||||||
|
platform: windows
|
||||||
|
target: exe
|
||||||
|
|
||||||
|
- name: release-ios-ipa
|
||||||
|
package:
|
||||||
|
platform: ios
|
||||||
|
target: ipa
|
||||||
|
|
||||||
|
|
||||||
|
- name: Release-Android
|
||||||
|
jobs:
|
||||||
|
- name: release-android-apk
|
||||||
|
package:
|
||||||
|
platform: android
|
||||||
|
target: apk
|
||||||
|
build_args:
|
||||||
|
target-platform: android-arm,android-arm64,android-x64
|
||||||
|
|
||||||
|
- name: release-android-bundle
|
||||||
|
package:
|
||||||
|
platform: android
|
||||||
|
target: aab
|
||||||
|
build_args:
|
||||||
|
target-platform: android-arm,android-arm64,android-x64
|
||||||
|
|
||||||
|
- name: Release-Linux
|
||||||
|
- name: release-linux
|
||||||
|
package:
|
||||||
|
platform: windows
|
||||||
|
target: exe
|
||||||
|
|
||||||
|
- name: release-ios-ipa
|
||||||
|
package:
|
||||||
|
platform: ios
|
||||||
|
target: ipa
|
||||||
42
ios/packaging/ios/make_config.yaml
Normal file
42
ios/packaging/ios/make_config.yaml
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
display_name: Hiddify
|
||||||
|
|
||||||
|
icon: ..\..\assets\images\logo_round.ico
|
||||||
|
|
||||||
|
keywords:
|
||||||
|
- Hiddify
|
||||||
|
- Proxy
|
||||||
|
- VPN
|
||||||
|
- V2ray
|
||||||
|
- Nekoray
|
||||||
|
- Xray
|
||||||
|
- Psiphon
|
||||||
|
- OpenVPN
|
||||||
|
|
||||||
|
generic_name: Hiddify
|
||||||
|
|
||||||
|
actions:
|
||||||
|
- name: Start
|
||||||
|
label: start
|
||||||
|
arguments:
|
||||||
|
- --start
|
||||||
|
- name: Stop
|
||||||
|
label: stop
|
||||||
|
arguments:
|
||||||
|
- --stop
|
||||||
|
|
||||||
|
categories:
|
||||||
|
- Internet
|
||||||
|
|
||||||
|
startup_notify: true
|
||||||
|
|
||||||
|
# You can specify the shared libraries that you want to bundle with your app
|
||||||
|
#
|
||||||
|
# flutter_distributor automatically detects the shared libraries that your app
|
||||||
|
# depends on, but you can also specify them manually here.
|
||||||
|
#
|
||||||
|
# The following example shows how to bundle the libcurl library with your app.
|
||||||
|
#
|
||||||
|
# include:
|
||||||
|
# - libcurl.so.4
|
||||||
|
include: []
|
||||||
|
|
||||||
42
linux/packaging/appimage/make_config.yaml
Normal file
42
linux/packaging/appimage/make_config.yaml
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
display_name: Hiddify
|
||||||
|
|
||||||
|
icon: ..\..\assets\images\logo_round.ico
|
||||||
|
|
||||||
|
keywords:
|
||||||
|
- Hiddify
|
||||||
|
- Proxy
|
||||||
|
- VPN
|
||||||
|
- V2ray
|
||||||
|
- Nekoray
|
||||||
|
- Xray
|
||||||
|
- Psiphon
|
||||||
|
- OpenVPN
|
||||||
|
|
||||||
|
generic_name: Hiddify
|
||||||
|
|
||||||
|
actions:
|
||||||
|
- name: Start
|
||||||
|
label: start
|
||||||
|
arguments:
|
||||||
|
- --start
|
||||||
|
- name: Stop
|
||||||
|
label: stop
|
||||||
|
arguments:
|
||||||
|
- --stop
|
||||||
|
|
||||||
|
categories:
|
||||||
|
- Internet
|
||||||
|
|
||||||
|
startup_notify: true
|
||||||
|
|
||||||
|
# You can specify the shared libraries that you want to bundle with your app
|
||||||
|
#
|
||||||
|
# flutter_distributor automatically detects the shared libraries that your app
|
||||||
|
# depends on, but you can also specify them manually here.
|
||||||
|
#
|
||||||
|
# The following example shows how to bundle the libcurl library with your app.
|
||||||
|
#
|
||||||
|
# include:
|
||||||
|
# - libcurl.so.4
|
||||||
|
include: []
|
||||||
|
|
||||||
10
macos/packaging/dmg/make_config.yaml
Normal file
10
macos/packaging/dmg/make_config.yaml
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
title: Hiddify
|
||||||
|
contents:
|
||||||
|
- x: 448
|
||||||
|
y: 344
|
||||||
|
type: link
|
||||||
|
path: "/Applications"
|
||||||
|
- x: 192
|
||||||
|
y: 344
|
||||||
|
type: file
|
||||||
|
path: hiddify.app
|
||||||
@@ -7,3 +7,4 @@ install_dir_name: "{autopf64}\\hiddify"
|
|||||||
setup_icon_file: ..\..\assets\images\logo_round.ico
|
setup_icon_file: ..\..\assets\images\logo_round.ico
|
||||||
locales:
|
locales:
|
||||||
- en
|
- en
|
||||||
|
- fa
|
||||||
6
windows/packaging/msix/make_config.yaml
Normal file
6
windows/packaging/msix/make_config.yaml
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
display_name: Hiddify
|
||||||
|
publisher_display_name: Hiddify
|
||||||
|
identity_name: app.hiddify.com
|
||||||
|
msix_version: 1.0.0.0
|
||||||
|
logo_path: ..\..\assets\images\logo_round.ico
|
||||||
|
capabilities: internetClient, privateNetworkClientServer
|
||||||
Reference in New Issue
Block a user