Merge branch 'main'

This commit is contained in:
problematicconsumer
2024-01-18 12:54:22 +03:30
6 changed files with 6 additions and 86 deletions

View File

@@ -9,7 +9,6 @@ on:
- '**.md'
- 'docs/**'
- '.github/**'
- 'Package.swift'
- '!.github/workflows/release.yml'
jobs:
@@ -73,21 +72,15 @@ jobs:
- name: zip
run: |
tree
rm -f ./bin/*.h
rm ./bin/hiddify-libcore*sources* ||echo "no source"
rm ./bin/hiddify-libcore-macos-a*.dylib || echo "no macos arm and amd"
rm -f /*.h
rm ./hiddify-libcore*sources* ||echo "no source"
rm ./hiddify-libcore-macos-a*.dylib || echo "no macos arm and amd"
if [[ "${{ matrix.job.target }}" == "ios" ]];then
cd bin
zip -r hiddify-libcore-ios.xcframework.zip hiddify-libcore-ios.xcframework
tar -czvf hiddify-libcore-ios.xcframework.tar.gz hiddify-libcore-ios.xcframework
rm -rf hiddify-libcore-ios.xcframework
else
gzip -r -S ".gz" ./bin/hiddify-libcore*
gzip -r -S ".gz" ./hiddify-libcore*
fi
- name: Calculate SHA256 Checksum
if: startsWith(matrix.job.target,'ios')
run: |
sha256sum hiddify-libcore-ios.xcframework.zip | awk '{print $1}'> hiddify-libcore-ios.xcframework.zip.sha256
working-directory: bin
- uses: actions/upload-artifact@v3
if: ${{ success() }}

View File

@@ -1,7 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "self:">
</FileRef>
</Workspace>

View File

@@ -1,32 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>SchemeUserState</key>
<dict>
<key>Libcore.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>0</integer>
</dict>
<key>hiddify-next-core-Package.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>1</integer>
</dict>
</dict>
<key>SuppressBuildableAutocreation</key>
<dict>
<key>Libcore</key>
<dict>
<key>primary</key>
<true/>
</dict>
<key>hiddify-next-core</key>
<dict>
<key>primary</key>
<true/>
</dict>
</dict>
</dict>
</plist>

View File

@@ -60,14 +60,11 @@ release: # Create a new tag for release.
VERSION_STR="$${VERSION_ARRAY[0]}.$${VERSION_ARRAY[1]}.$${VERSION_ARRAY[2]}" && \
BUILD_NUMBER=$$(( $${VERSION_ARRAY[0]} * 10000 + $${VERSION_ARRAY[1]} * 100 + $${VERSION_ARRAY[2]} )) && \
echo "version: $${VERSION_STR}+$${BUILD_NUMBER}" && \
# sed -i "s/^s.version: .*/s.version = '$${VERSION_STR}'/g" Libcore.podspec && \
sed -i "s/^let version: .*/let version = \"v$${VERSION_STR}\"/g" Package.swift && \
sed -i -e "s|<key>CFBundleVersion</key>\s*<string>[^<]*</string>|<key>CFBundleVersion</key><string>$${VERSION_STR}</string>|" Info.plist &&\
sed -i -e "s|<key>CFBundleShortVersionString</key>\s*<string>[^<]*</string>|<key>CFBundleShortVersionString</key><string>$${VERSION_STR}</string>|" Info.plist &&\
git tag $${TAG} > /dev/null && \
git tag -d $${TAG} > /dev/null && \
git add Package.swift Info.plist && \
git add Info.plist && \
git commit -m "release: version $${TAG}" && \
echo "creating git tag : v$${TAG}" && \
git tag v$${TAG} && \

View File

@@ -1,31 +0,0 @@
// swift-tools-version: 5.4
// The swift-tools-version declares the minimum version of Swift required to build this package.
import PackageDescription
import Foundation
let version = "v0.11.0"
let baseURL = "https://github.com/hiddify/hiddify-next-core/releases/download/"
let packageURL = baseURL + version + "/hiddify-libcore-ios.xcframework.zip"
let package = Package(
name: "Libcore",
platforms: [
.iOS(.v13) // Minimum platform version
],
products: [
.library(
name: "Libcore",
targets: ["Libcore"]),
],
dependencies: [
// No dependencies
],
targets: [
.binaryTarget(
name: "Libcore",
url: packageURL,
checksum: "4c24525948c624167398c6205004d398c59278ce2551193005d2de95168555bd"
)
]
)