Skip to content

Commit

Permalink
fix: release bug
Browse files Browse the repository at this point in the history
  • Loading branch information
hiddify-com committed Feb 2, 2024
1 parent 87cd6a0 commit a89543e
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,14 @@ jobs:
rm -f /*.h
rm ./hiddify-libcore*sources* ||echo "no source"
rm ./hiddify-libcore-macos-a*.dylib || echo "no macos arm and amd"
tar -czvf hiddify-core-${{ matrix.job.target }}.tar.gz --transform='s,^./,,g' $(find . -regex '\./libcore\.\(dll\|so\|dylib\|xcframework\)$\|./hiddify-service\(\.exe\)*$')
files=$(find . \( -name 'libcore.*' \
-a \( -name '*.dll' -o -name '*.so' -o -name '*.dylib' -name '*.aar' \) \) \
-o \
-name 'Libcore.xcframework' \
-o \
-name 'hiddify-service*' )
tar -czvf hiddify-core-${{ matrix.job.target }}.tar.gz --transform='s,^./,,g' $files
working-directory: bin
- uses: actions/upload-artifact@v3
Expand Down
9 changes: 4 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,7 @@ windows-amd64:
env GOOS=windows GOARCH=amd64 CC=x86_64-w64-mingw32-gcc $(GOBUILDLIB) -o $(BINDIR)/$(LIBNAME).dll ./custom
go get github.com/akavel/rsrc
go install github.com/akavel/rsrc

$$(go env GOPATH)/bin/rsrc -manifest admin_service/cmd/admin_service.manifest -ico ../assets/images/tray_icon_connected.ico -o admin_service/cmd/admin_service.syso
$$(go env GOPATH)/bin/rsrc -manifest admin_service/cmd/admin_service.manifest -ico ./assets/hiddify-service.ico -o admin_service/cmd/admin_service.syso
env GOOS=windows GOARCH=amd64 CC=x86_64-w64-mingw32-gcc CGO_LDFLAGS="bin/$(LIBNAME).dll" $(GOBUILDSRV) -o $(BINDIR)/$(SRVNAME).exe ./admin_service/cmd

linux-amd64:
Expand All @@ -49,12 +48,12 @@ linux-amd64:
chmod +x $(BINDIR)/$(SRVNAME)

macos-amd64:
env GOOS=darwin GOARCH=amd64 CGO_CFLAGS="-mmacosx-version-min=10.11" CGO_LDFLAGS="-mmacosx-version-min=10.11" CGO_ENABLED=1 go build -trimpath -tags $(TAGS),$(IOS_TAGS) -buildmode=c-shared -o $(BINDIR)/$(LIBNAME).dylib ./custom
env GOOS=darwin GOARCH=amd64 CGO_CFLAGS="-mmacosx-version-min=10.11" CGO_LDFLAGS="-mmacosx-version-min=10.11" CGO_ENABLED=1 go build -trimpath -tags $(TAGS),$(IOS_TAGS) -buildmode=c-shared -o $(BINDIR)/$(LIBNAME)-amd64.dylib ./custom
macos-arm64:
env GOOS=darwin GOARCH=arm64 CGO_CFLAGS="-mmacosx-version-min=10.11" CGO_LDFLAGS="-mmacosx-version-min=10.11" CGO_ENABLED=1 go build -trimpath -tags $(TAGS),$(IOS_TAGS) -buildmode=c-shared -o $(BINDIR)/$(LIBNAME).dylib ./custom
env GOOS=darwin GOARCH=arm64 CGO_CFLAGS="-mmacosx-version-min=10.11" CGO_LDFLAGS="-mmacosx-version-min=10.11" CGO_ENABLED=1 go build -trimpath -tags $(TAGS),$(IOS_TAGS) -buildmode=c-shared -o $(BINDIR)/$(LIBNAME)-arm64.dylib ./custom

macos-universal: macos-amd64 macos-arm64
lipo -create $(BINDIR)/$(BASENAME)-macos-amd64.dylib $(BINDIR)/$(BASENAME)-macos-arm64.dylib -output $(BINDIR)/$(LIBNAME).dylib
lipo -create $(BINDIR)/$(LIBNAME)-amd64.dylib $(BINDIR)/$(LIBNAME)-arm64.dylib -output $(BINDIR)/$(LIBNAME).dylib
env GOOS=darwin GOARCH=amd64 CGO_CFLAGS="-mmacosx-version-min=10.11" CGO_LDFLAGS="-mmacosx-version-min=10.11" CGO_LDFLAGS="bin/$(LIBNAME).dylib" CGO_ENABLED=1 $(GOBUILDSRV) -o $(BINDIR)/$(SRVNAME) ./admin_service/cmd
chmod +x $(BINDIR)/$(SRVNAME)

Expand Down
Binary file added assets/hiddify-service.ico
Binary file not shown.

0 comments on commit a89543e

Please sign in to comment.