mirror of
https://github.com/GopeedLab/gopeed.git
synced 2026-11-17 13:53:41 +00:00
ci: macos arm
This commit is contained in:
1 parent
97eca4ec9c
commit
8a47b6cfb5
1 file changed
+7
-3
@@ -8,6 +8,7 @@ on:
|
|||||||
- '_docs/**'
|
- '_docs/**'
|
||||||
- '_examples/**'
|
- '_examples/**'
|
||||||
- 'README*.md'
|
- 'README*.md'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
release:
|
release:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@@ -46,7 +47,7 @@ jobs:
|
|||||||
dir="dist/gopeed-$VERSION-$goos-$goarch/"
|
dir="dist/gopeed-$VERSION-$goos-$goarch/"
|
||||||
(GOOS=$goos GOARCH=$goarch go build -tags nosqlite -ldflags="-s -w" -o $dir github.com/monkeyWie/gopeed/cmd/gopeed \
|
(GOOS=$goos GOARCH=$goarch go build -tags nosqlite -ldflags="-s -w" -o $dir github.com/monkeyWie/gopeed/cmd/gopeed \
|
||||||
&& cd $dir \
|
&& cd $dir \
|
||||||
&& zip -r ../zip/gopeed-cli-$VERSION-$goos-$goarch.zip * \
|
&& zip -r ../zip/gopeed-cli-$VERSION-$goarch-$goos.zip * \
|
||||||
&& cd ../..) \
|
&& cd ../..) \
|
||||||
|| true
|
|| true
|
||||||
done
|
done
|
||||||
@@ -76,7 +77,10 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
VERSION: ${{ needs.release.outputs.tag_name }}
|
VERSION: ${{ needs.release.outputs.tag_name }}
|
||||||
run: |
|
run: |
|
||||||
go build -tags nosqlite -ldflags="-w -s" -buildmode=c-shared -o ui/flutter/macos/Frameworks/libgopeed.dylib github.com/monkeyWie/gopeed/bind/desktop
|
go install src.techknowlogick.com/xgo@latest
|
||||||
|
xgo -go go-1.18.x --targets=darwin/arm64 -tags="nosqlite" -ldflags="-w -s" -buildmode=c-shared -pkg=bind/desktop -out=libgopeed .
|
||||||
|
mv libgopeed-*.dylib ui/flutter/macos/Frameworks/libgopeed.dylib
|
||||||
|
# go build -tags nosqlite -ldflags="-w -s" -buildmode=c-shared -o ui/flutter/macos/Frameworks/libgopeed.dylib github.com/monkeyWie/gopeed/bind/desktop
|
||||||
|
|
||||||
cd ui/flutter
|
cd ui/flutter
|
||||||
flutter config --enable-macos-desktop
|
flutter config --enable-macos-desktop
|
||||||
@@ -93,7 +97,7 @@ jobs:
|
|||||||
}
|
}
|
||||||
EOF
|
EOF
|
||||||
mkdir dist
|
mkdir dist
|
||||||
appdmg appdmg.json dist/Gopeed-$VERSION.dmg
|
appdmg appdmg.json dist/Gopeed-$VERSION-arm64-macos.dmg
|
||||||
- name: Upload
|
- name: Upload
|
||||||
uses: shogo82148/actions-upload-release-asset@v1
|
uses: shogo82148/actions-upload-release-asset@v1
|
||||||
with:
|
with:
|
||||||
|
|||||||
Reference in new issue
Block a user