mirror of
https://github.com/GopeedLab/gopeed.git
synced 2026-11-07 00:50:27 +00:00
ci: apk build
This commit is contained in:
1 parent
655f9d99c7
commit
4371345c7d
5 files changed
+57
-6
No files matched your search
@@ -88,8 +88,7 @@ jobs:
|
||||
with:
|
||||
name: macos-arm64-lib
|
||||
path: libgopeed.dylib
|
||||
|
||||
build-macos-arm64:
|
||||
build-macos:
|
||||
runs-on: macos-latest
|
||||
needs: [ release, build-macos-arm64-lib ]
|
||||
steps:
|
||||
@@ -112,11 +111,11 @@ jobs:
|
||||
env:
|
||||
VERSION: ${{ needs.release.outputs.tag_name }}
|
||||
run: |
|
||||
# go build -tags nosqlite -ldflags="-w -s" -buildmode=c-shared -o ui/flutter/macos/Frameworks/libgopeed.dylib github.com/monkeyWie/gopeed/bind/desktop
|
||||
PROJECT_DIR=$(pwd)
|
||||
|
||||
cd ui/flutter
|
||||
flutter config --enable-macos-desktop
|
||||
flutter build macos --release
|
||||
flutter build macos
|
||||
cd build/macos/Build/Products/Release
|
||||
cat>appdmg.json<<EOF
|
||||
{
|
||||
@@ -130,9 +129,46 @@ jobs:
|
||||
EOF
|
||||
mkdir dist
|
||||
appdmg appdmg.json dist/Gopeed-$VERSION-arm64-macos.dmg
|
||||
|
||||
# amd64
|
||||
cd $PROJECT_DIR
|
||||
go build -tags nosqlite -ldflags="-w -s" -buildmode=c-shared -o bin/libgopeed.dylib github.com/monkeyWie/gopeed/bind/desktop
|
||||
cp -rf bin/libgopeed.dylib ui/flutter/build/macos/Build/Products/Release/Gopeed.app/Contents/Frameworks/ github.com/monkeyWie/gopeed/bind/desktop
|
||||
cd ui/flutter/build/macos/Build/Products/Release
|
||||
appdmg appdmg.json dist/Gopeed-$VERSION-amd64-macos.dmg
|
||||
- name: Upload
|
||||
uses: shogo82148/actions-upload-release-asset@v1
|
||||
with:
|
||||
upload_url: ${{ needs.release.outputs.upload_url }}
|
||||
asset_path: ui/flutter/build/macos/Build/Products/Release/dist/*
|
||||
overwrite: true
|
||||
overwrite: true
|
||||
build-android:
|
||||
runs-on: ubuntu-latest
|
||||
needs: [ release ]
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: '^1.19'
|
||||
cache: true
|
||||
- uses: actions/setup-java@v3
|
||||
with:
|
||||
distribution: 'zulu'
|
||||
java-version: '11'
|
||||
- uses: subosito/flutter-action@v2
|
||||
- name: Build
|
||||
env:
|
||||
VERSION: ${{ needs.release.outputs.tag_name }}
|
||||
run: |
|
||||
mkdir ui/flutter/android/app/libs
|
||||
gomobile bind -ldflags="-w -s" -o ui/flutter/android/app/libs/libgopeed.aar -target=android -androidapi 19 -javapkg=com.gopeed github.com/monkeyWie/gopeed/bind/mobile
|
||||
cd ui/flutter
|
||||
flutter build apk
|
||||
mkdir dist
|
||||
cp build/app/outputs/flutter-apk/app-release.apk dist/gopeed-$VERSION-android.apk
|
||||
- name: Upload
|
||||
uses: shogo82148/actions-upload-release-asset@v1
|
||||
with:
|
||||
upload_url: ${{ needs.release.outputs.upload_url }}
|
||||
asset_path: ui/flutter/dist/*
|
||||
overwrite: true
|
||||
Reference in new issue
Block a user