This commit is contained in:
hiddify
2023-12-03 11:34:12 +03:30
268 changed files with 7756 additions and 4970 deletions

View File

@@ -1,25 +1,27 @@
[![Release Downloads](https://img.shields.io/github/downloads/hiddify/hiddify-next/RELEASE_TAG/total?style=flat-square&logo=github)](https://img.shields.io/github/downloads/hiddify/hiddify-next/RELEASE_TAG/)
**Release Highlights:**
-
-
-
-
<details markdown=1 dir="rtl">
<summary>تغییرات اصلی به فارسی</summary>
-
-
-
-
-
</details>
**Download based on your OS:**
<div dir="rtl">
**بر اساس سیستم عامل خود دانلود کنید:**
</div>
<div align=left>
<table>
<thead align=left>
@@ -45,27 +47,19 @@
</tr>
<tr>
<td>macOS (v10.14+)</td>
<td><a href="https://github.com/hiddify/hiddify-next/releases/latest/download/hiddify-macos-universal.zip"><img src="https://img.shields.io/badge/DMG-Universal-ea005e.svg?logo=github"></a></td>
<td><a href="https://github.com/hiddify/hiddify-next/releases/download/RELEASE_TAG/hiddify-macos-universal.zip"><img src="https://img.shields.io/badge/DMG-Universal-ea005e.svg?logo=github"></a></td>
</tr>
<tr>
<td>Linux</td>
<td><a href="https://github.com/hiddify/hiddify-next/releases/download/RELEASE_TAG/hiddify-macos-universal.zip"><img src="https://img.shields.io/badge/AppImage-x64-f84e29.svg?logo=github"> </a></td>
<td><a href="https://github.com/hiddify/hiddify-next/releases/download/RELEASE_TAG/hiddify-linux-x64.zip"><img src="https://img.shields.io/badge/AppImage-x64-f84e29.svg?logo=github"> </a></td>
</tr>
</tbody>
</table>
</div>
<div dir="rtl">
<div dir="ltr">
**List of all changes:** [ChangeLog](https://github.com/hiddify/hiddify-next/blob/main/CHANGELOG.md)
</div>

View File

@@ -14,6 +14,7 @@ python3 auto_translator.py en fa
python3 auto_translator.py en zh
# python3 auto_translator.py en pt
python3 auto_translator.py en ru
python3 auto_translator.py en tr

View File

@@ -4,12 +4,13 @@ on:
branches:
- main
tags:
- "v*"
- 'v*'
paths-ignore:
- "**.md"
- "docs/**"
- ".github/**"
- "!.github/workflows/build.yml"
- '**.md'
- 'docs/**'
- '.github/**'
- '!.github/workflows/build.yml'
- 'appcast.xml'
# pull_request:
# branches:
# - main
@@ -77,15 +78,15 @@ jobs:
- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: "3.13.x"
channel: "stable"
flutter-version: '3.16.x'
channel: 'stable'
cache: true
- name: Setup Java
if: startsWith(matrix.platform,'android')
uses: actions/setup-java@v3
with:
distribution: "zulu"
distribution: 'zulu'
java-version: 11
- name: Setup NDK
@@ -305,7 +306,7 @@ jobs:
uses: 8Mi-Tech/delete-release-assets-action@main
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
tag: "draft"
tag: 'draft'
deleteOnlyFromDrafts: false
- name: Create or Update Draft Release
@@ -315,8 +316,8 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
files: ./out/*
name: "draft"
tag_name: "draft"
name: 'draft'
tag_name: 'draft'
prerelease: true
upload-release:
@@ -356,7 +357,7 @@ jobs:
with:
prerelease: ${{ env.CHANNEL == 'dev' }}
tag_name: ${{ github.ref_name }}
body_path: "./release.md"
body_path: './release.md'
files: ./out/*
- name: Create service_account.json
@@ -369,7 +370,8 @@ jobs:
packageName: app.hiddify.com
releaseName: ${{ github.ref }}
releaseFiles: ./hiddify-android-market.aab
track: ${{ env.CHANNEL == 'dev' && 'beta' || 'internal' }}
# track: ${{ env.CHANNEL == 'dev' && 'beta' || 'internal' }}
track: 'beta'
# - name: "Upload app to TestFlight"
# uses: apple-actions/upload-testflight-build@v1
@@ -389,28 +391,27 @@ jobs:
id: version
uses: ashley-taylor/regex-property-action@v1.3
with:
value: "${{ github.ref_name }}"
regex: "^v|.dev$"
flags: "" # Optional, defaults to "g"
replacement: ""
value: '${{ github.ref_name }}'
regex: '^v|.dev$'
flags: 'gi' # Optional, defaults to "g"
replacement: ''
- name: Winget Publish
if: ${{ env.CHANNEL != 'dev' }}
uses: isaacrlevin/winget-publish-action@v.5
with:
publish-type: "Update"
user: "Hiddify"
package: "Next"
publish-type: 'Update'
user: 'Hiddify'
package: 'Next'
version: ${{ steps.version.outputs.value }}
url: "https://github.com/hiddify/hiddify-next/releases/download/${{ github.ref_name }}/hiddify-windows-x64-setup.zip"
url: 'https://github.com/hiddify/hiddify-next/releases/download/${{ github.ref_name }}/hiddify-windows-x64-setup.zip'
token: ${{ secrets.WINGET_TOKEN }}
- name: Winget Publish Beta
uses: isaacrlevin/winget-publish-action@v.5
with:
publish-type: "Update"
user: "Hiddify"
package: "Next"
publish-type: 'Update'
user: 'Hiddify'
package: 'Next.Beta'
version: ${{ steps.version.outputs.value }}
url: "https://github.com/hiddify/hiddify-next/releases/download/${{ github.ref_name }}/hiddify-windows-x64-setup.zip"
url: 'https://github.com/hiddify/hiddify-next/releases/download/${{ github.ref_name }}/hiddify-windows-x64-setup.zip'
token: ${{ secrets.WINGET_TOKEN }}

196
.github/workflows/dev-i.yml vendored Normal file
View File

@@ -0,0 +1,196 @@
name: dev i
on:
push:
branches:
- main
tags:
- 'v*'
paths-ignore:
- '**.md'
- 'docs/**'
- '.github/**'
- '!.github/workflows/*'
- 'appcast.xml'
# pull_request:
# branches:
# - main
concurrency:
group: ${{ github.ref }}-${{ github.workflow }}
cancel-in-progress: true
env:
CHANNEL: ${{ github.ref_type == 'tag' && endsWith(github.ref_name, 'dev') && 'dev' || github.ref_type != 'tag' && 'dev' || 'prod' }}
NDK_VERSION: r26b
jobs:
build:
permissions: write-all
strategy:
fail-fast: false
matrix:
include:
# - platform: android-apk
# os: ubuntu-latest
# targets: apk
# - platform: android-aab
# os: ubuntu-latest
# targets: aab
# - platform: windows
# os: windows-latest
# aarch: amd64
# targets: exe
# filename: hiddify-windows-x64
# - platform: linux
# os: ubuntu-latest
# aarch: amd64
# targets: AppImage
# filename: hiddify-linux-x64
# - platform: macos
# os: macos-13
# aarch: universal
# targets: dmg
# filename: hiddify-macos-universal
- platform: ios
os: macos-13
aarch: universal
filename: hiddify-ios
targets: ipa
runs-on: ${{ matrix.os }}
steps:
- name: checkout
uses: actions/checkout@v3
- name: Install macos dmg needed tools
if: matrix.platform == 'macos' || matrix.platform == 'ios'
run: |
# xcode-select --install || softwareupdate --all --install --force
# brew uninstall --force $(brew list | grep python@) && brew cleanup || echo "python not installed"
brew uninstall --ignore-dependencies python@3.12
brew reinstall python@3.10
python3 -m pip install --upgrade setuptools pip
brew install create-dmg tree
npm install -g appdmg
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: '15.0.1'
- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: '3.16.x'
channel: 'stable'
cache: true
- name: Setup Flutter Distributor
if: ${{ !startsWith(matrix.platform,'android') }}
run: |
dart pub global activate flutter_distributor
- name: Get Geo Assets
run: |
make get-geo-assets
- name: Get Dependencies
run: |
make get
- name: Generate
run: |
make translate
make gen
- name: Get Libs ${{ matrix.platform }}
run: |
make ${{ matrix.platform }}-libs
- name: Setup Apple certificate and provisioning profile
if: startsWith(matrix.os,'macos')
env:
BUILD_CERTIFICATE_BASE64: ${{ secrets.APPLE_BUILD_CERTIFICATE_BASE64 }}
P12_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_P12_PASSWORD }}
BUILD_PROVISION_PROFILE_BASE64: ${{ secrets.APPLE_BUILD_PROVISION_PROFILE_BASE64 }}
BUILD_PACKET_TUNNEL_PROVISION_PROFILE_BASE64: ${{ secrets.APPLE_BUILD_PACKET_TUNNEL_PROVISION_PROFILE_BASE64 }}
KEYCHAIN_PASSWORD: ${{ secrets.APPLE_KEYCHAIN_PASSWORD }}
run: |
# create variables
CERTIFICATE_PATH=$RUNNER_TEMP/build_certificate.p12
PP_PATH=$RUNNER_TEMP/build_pp.mobileprovision
PP_PACKET_TUNNEL_PATH=$RUNNER_TEMP/build_pppt.mobileprovision
KEYCHAIN_PATH=$RUNNER_TEMP/app-signing.keychain-db
# import certificate and provisioning profile from secrets
echo -n "$BUILD_CERTIFICATE_BASE64" | base64 --decode -o $CERTIFICATE_PATH
echo -n "$BUILD_PROVISION_PROFILE_BASE64" | base64 --decode -o $PP_PATH
echo -n "$BUILD_PACKET_TUNNEL_PROVISION_PROFILE_BASE64" | base64 --decode -o $PP_PACKET_TUNNEL_PATH
# create temporary keychain
security create-keychain -p "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH
security set-keychain-settings -lut 21600 $KEYCHAIN_PATH
security unlock-keychain -p "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH
# import certificate to keychain
security import $CERTIFICATE_PATH -P "$P12_PASSWORD" -A -t cert -f pkcs12 -k $KEYCHAIN_PATH
security list-keychain -d user -s $KEYCHAIN_PATH
# apply provisioning profile
mkdir -p ~/Library/MobileDevice/Provisioning\ Profiles
cp $PP_PATH ~/Library/MobileDevice/Provisioning\ Profiles
cp $PP_PACKET_TUNNEL_PATH ~/Library/MobileDevice/Provisioning\ Profiles
- name: Release ${{ matrix.platform }}
env:
SENTRY_DSN: ${{ secrets.SENTRY_DSN }}
run: |
make ${{ matrix.platform }}-release
- name: Upload Debug Symbols
if: ${{ github.ref_type == 'tag' }}
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
SENTRY_ORG: ${{ secrets.SENTRY_ORG }}
SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }}
SENTRY_DIST: ${{ matrix.platform == 'android-aab' && 'google-play' || 'general' }}
run: |
flutter packages pub run sentry_dart_plugin
- name: Copy to out unix
if: matrix.platform == 'linux' || matrix.platform == 'macos' || matrix.platform == 'ios'
run: |
ls -R dist/
mkdir out
mkdir tmp_out
EXT="${{ matrix.targets }}"
mv dist/*/*.$EXT tmp_out/${{matrix.filename}}.$EXT
chmod +x tmp_out/${{matrix.filename}}.$EXT
if [ "${{matrix.platform}}" == "linux" ];then
cp ./.github/help/linux/* tmp_out/
else
cp ./.github/help/mac-windows/* tmp_out/
fi
if [[ "${{matrix.platform}}" == 'ios' ]];then
mv tmp_out/${{matrix.filename}}.ipa bin/${{matrix.filename}}.ipa
else
cd tmp_out
7z a ${{matrix.filename}}.zip ./
mv *.zip ../out/
fi
- name: Clean up keychain and provisioning profile
if: ${{ always() && startsWith(matrix.os,'macos')}}
run: |
security delete-keychain $RUNNER_TEMP/app-signing.keychain-db
rm ~/Library/MobileDevice/Provisioning\ Profiles/build_pp.mobileprovision
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: artifact
path: ./out
retention-days: 2