new: make better ci and building applications

This commit is contained in:
Hiddify
2023-07-19 12:57:16 +02:00
parent 079f1f235f
commit 3e76cb62b7
8 changed files with 240 additions and 25 deletions

View File

@@ -8,8 +8,34 @@ on:
jobs:
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:
- name: checkout
uses: actions/checkout@v3
@@ -29,12 +55,14 @@ jobs:
platform: x64
- name: Setup Java
if: ${{ matrix.platform }} == "android"
uses: actions/setup-java@v3
with:
distribution: "zulu"
java-version: 11
- name: Setup Android SDK
if: ${{ matrix.platform }} == "android"
uses: android-actions/setup-android@v2
- name: Get Dependencies
@@ -46,27 +74,24 @@ jobs:
make gen
make translate
- name: Generate Libs
- name: Generate Android Libs
if: ${{ matrix.platform }} == "android"
run: |
make android-libs windows-libs
make android-libs
- name: Generate Windows Libs
if: ${{ matrix.platform }} == "windows"
run: |
make windows-libs
- name: Release Android
- name: Release ${{ matrix.platform }}
run: |
make release-android
find ./ -type f -name "*.apk" -exec cp {} . \;
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
with:
name: apk
path: ./*.apk
- 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
name: ${{ matrix.platform }}
path: ./out

View File

@@ -9,8 +9,48 @@ gen:
translate:
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:
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:
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

View File

@@ -6,9 +6,56 @@ releases:
package:
platform: windows
target: exe
- name: release-android-bundle
- name: release-android-apk
package:
platform: android
target: apk
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

View 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: []

View 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: []

View 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

View File

@@ -6,4 +6,5 @@ create_desktop_icon: true
install_dir_name: "{autopf64}\\hiddify"
setup_icon_file: ..\..\assets\images\logo_round.ico
locales:
- en
- en
- fa

View 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