diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f9461bb3..08927886 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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 }} diff --git a/Makefile b/Makefile index 445cc656..47420aab 100644 --- a/Makefile +++ b/Makefile @@ -2,6 +2,7 @@ include dependencies.properties BINDIR=./libcore/bin ANDROID_OUT=./android/app/libs +IOS_OUT=./ios/Pods/Frameworks DESKTOP_OUT=./libcore/bin GEO_ASSETS_DIR=./assets/core @@ -78,7 +79,8 @@ macos-libs: ios-libs: #not tested mkdir -p $(DESKTOP_OUT)/ &&\ - curl -L $(CORE_URL)/$(CORE_NAME)-ios-universal.xcframework.gz | gunzip > $(DESKTOP_OUT)/libcore.xcframework + curl -L $(CORE_URL)/$(CORE_NAME)-ios.xcframework.tar.gz | tar xz -C "$(IOS_OUT)" && \ + mv $(IOS_OUT)/$(CORE_NAME)-ios.xcframework $(IOS_OUT)/libcore.xcframework get-geo-assets: curl -L https://github.com/SagerNet/sing-geoip/releases/latest/download/geoip.db -o $(GEO_ASSETS_DIR)/geoip.db @@ -99,8 +101,9 @@ build-linux-libs: build-macos-libs: make -C libcore -f Makefile macos-universal && mv $(BINDIR)/$(CORE_NAME)-macos-universal.dylib $(DESKTOP_OUT)/libcore.dylib -build-ios-libs: #not tested - make -C libcore -f Makefile ios && mv $(BINDIR)/$(CORE_NAME)-ios.xcframework $(DESKTOP_OUT)/libcore.xcframework +build-ios-libs: + make -C libcore -f Makefile ios && mv $(BINDIR)/$(CORE_NAME)-ios.xcframework $(IOS_OUT)/libcore.xcframework + release: # Create a new tag for release. diff --git a/ios/Pods/Frameworks/.gitkeep b/ios/Pods/Frameworks/.gitkeep new file mode 100644 index 00000000..e69de29b