new: add sha256 to github action for ios

This commit is contained in:
Hiddify
2024-01-16 16:52:42 +00:00
parent 7b2bf9503c
commit e6fe03c190
3 changed files with 52 additions and 25 deletions

View File

@@ -28,7 +28,7 @@ ios-full: lib_install
ios: lib_install
gomobile bind -v -target ios -libname=box -tags=$(TAGS),with_dhcp,with_low_memory,with_conntrack -trimpath -ldflags="-w -s" -o $(BINDIR)/$(PRODUCT_NAME).xcframework github.com/sagernet/sing-box/experimental/libbox ./mobile &&\
mv $(BINDIR)/$(PRODUCT_NAME).xcframework $(BINDIR)/$(NAME).xcframework &&\
cp Libcore.podspec $(BINDIR)/$(NAME).xcframework/
# cp Libcore.podspec $(BINDIR)/$(NAME).xcframework/
cp Info.plist $(BINDIR)/$(NAME).xcframework/
@@ -61,12 +61,14 @@ 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/^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 Libcore.podspec Info.plist && \
git add Package.swift Info.plist && \
git commit -m "release: version $${TAG}" && \
echo "creating git tag : v$${TAG}" && \
git tag v$${TAG} && \