Merge branch 'main' into ios

This commit is contained in:
GFWFighter
2023-10-24 18:38:48 +03:30
committed by GitHub
44 changed files with 747 additions and 1717 deletions

View File

@@ -6,8 +6,8 @@ import os
def get_path(lang):
if lang == 'en':
return f'../assets/translations/strings.i18n.json'
# if lang == 'en':
# return f'../assets/translations/strings.i18n.json'
return f'../assets/translations/strings_{lang}.i18n.json'

View File

@@ -1,9 +1,9 @@
key="FRu3eopQWgsvWmnycBXxv2eWpbUwGOu2"
wget -O ../assets/translations/strings.i18n.json "https://localise.biz/api/export/locale/en-US.json?index=id&format=i18next4&key=$key"
wget -O ../assets/translations/strings_fa.i18n.json "https://localise.biz/api/export/locale/fa.json?index=id&format=i18next4&key=$key"
wget -O ../assets/translations/strings_zh.i18n.json "https://localise.biz/api/export/locale/zh.json?index=id&format=i18next4&key=$key"
# # wget -O ../assets/translations/strings_pt.i18n.json "https://localise.biz/api/export/locale/pt.json?index=id&format=i18next4&key=$key"
wget -O ../assets/translations/strings_ru.i18n.json "https://localise.biz/api/export/locale/ru.json?index=id&format=i18next4&key=$key"
# key="FRu3eopQWgsvWmnycBXxv2eWpbUwGOu2"
# wget -O ../assets/translations/strings_en.i18n.json "https://localise.biz/api/export/locale/en-US.json?index=id&format=i18next4&key=$key"
# wget -O ../assets/translations/strings_fa.i18n.json "https://localise.biz/api/export/locale/fa.json?index=id&format=i18next4&key=$key"
# wget -O ../assets/translations/strings_zh.i18n.json "https://localise.biz/api/export/locale/zh.json?index=id&format=i18next4&key=$key"
# # # wget -O ../assets/translations/strings_pt.i18n.json "https://localise.biz/api/export/locale/pt.json?index=id&format=i18next4&key=$key"
# wget -O ../assets/translations/strings_ru.i18n.json "https://localise.biz/api/export/locale/ru.json?index=id&format=i18next4&key=$key"
@@ -20,9 +20,9 @@ python3 auto_translator.py en ru
function update_localise(){
lang=$1
pat="../assets/translations/strings_${lang}.i18n.json"
if [[ $lang == 'en' ]];then
pat="../assets/translations/strings.i18n.json"
fi
# if [[ $lang == 'en' ]];then
# pat="../assets/translations/strings.i18n.json"
# fi
# curl -X POST "https://localise.biz/api/import/json?locale=$lang&key=$LOCALIZ_KEY" \
curl "https://localise.biz/api/import/json?format=i18next4&delete-absent=false&ignore-existing=false&locale=$lang&flag-new=Provisional&key=$LOCALIZ_KEY" \
-H 'Accept: application/json' \
@@ -30,8 +30,8 @@ curl "https://localise.biz/api/import/json?format=i18next4&delete-absent=false&i
}
update_localise en
update_localise fa
update_localise zh
# # # update_localise pt
update_localise ru
# update_localise en
# update_localise fa
# update_localise zh
# # # # update_localise pt
# update_localise ru

View File

@@ -4,12 +4,12 @@ on:
branches:
- main
tags:
- 'v*'
- "v*"
paths-ignore:
- '**.md'
- 'docs/**'
- '.github/**'
- '!.github/workflows/build.yml'
- "**.md"
- "docs/**"
- ".github/**"
- "!.github/workflows/build.yml"
pull_request:
branches:
- main
@@ -57,6 +57,7 @@ jobs:
# - platform: ios
# os: macos-11
# aarch: universal
# filename: hiddify-ios-universal
# targets: ipa
runs-on: ${{ matrix.os }}
@@ -67,15 +68,15 @@ jobs:
- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: '3.13.x'
channel: 'stable'
flutter-version: "3.13.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
@@ -164,7 +165,7 @@ jobs:
xcopy /s /v '.\.github\help\mac-windows\' .\tmp_out\
cd tmp_out
Compress-Archive .\ ..\out\hiddify-${{ matrix.platform }}-x64-setup.zip
Compress-Archive -Path .\* -DestinationPath ..\out\hiddify-${{ matrix.platform }}-x64-setup.zip
cd ..
@@ -205,10 +206,13 @@ jobs:
else
cp ./.github/help/mac-windows/* tmp_out/
fi
cd tmp_out
7z a ${{matrix.filename}}.zip ./
mv *.zip ../out/
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: Copy to out unix
# if: matrix.platform == 'linux' || matrix.platform == 'macos' || matrix.platform == 'ios'
@@ -259,7 +263,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
@@ -269,8 +273,8 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
files: ./out/*
name: 'draft'
tag_name: 'draft'
name: "draft"
tag_name: "draft"
prerelease: true
upload-release:
@@ -310,7 +314,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
@@ -324,3 +328,11 @@ jobs:
releaseName: ${{ github.ref }}
releaseFiles: ./hiddify-android-market.aab
track: internal
# - name: 'Upload app to TestFlight'
# uses: apple-actions/upload-testflight-build@v1
# with:
# app-path: './hiddify-ios-universal.ipa'
# issuer-id: ${{ secrets.APPSTORE_ISSUER_ID }}
# api-key-id: ${{ secrets.APPSTORE_API_KEY_ID }}
# api-private-key: ${{ secrets.APPSTORE_API_PRIVATE_KEY }}