mirror of
https://github.com/venera-app/venera.git
synced 2025-09-27 07:47:24 +00:00
Support Linux arm64. Close #176
This commit is contained in:
55
.github/workflows/main.yml
vendored
55
.github/workflows/main.yml
vendored
@@ -39,12 +39,18 @@ jobs:
|
||||
ln -s /Applications dist/dmg_contents/Applications
|
||||
hdiutil create -volname "venera" -srcfolder dist/dmg_contents -ov -format UDZO "dist/venera.dmg"
|
||||
|
||||
- name: Add version to filename
|
||||
run: |
|
||||
APP_VERSION=$(grep "version:" pubspec.yaml | cut -d':' -f2 | tr -d ' ')
|
||||
mkdir -p result
|
||||
mv dist/venera.dmg result/venera-$APP_VERSION.dmg
|
||||
|
||||
# Step 4: Attach and upload artifacts (optional)
|
||||
- name: Upload DMG
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: venera.dmg
|
||||
path: dist/venera.dmg
|
||||
name: macos_build
|
||||
path: result/
|
||||
Build_IOS:
|
||||
runs-on: macos-15
|
||||
steps:
|
||||
@@ -62,10 +68,15 @@ jobs:
|
||||
mv /Users/runner/work/venera/venera/build/ios/iphoneos/Runner.app /Users/runner/work/venera/venera/build/ios/iphoneos/Payload
|
||||
cd /Users/runner/work/venera/venera/build/ios/iphoneos/
|
||||
zip -r venera-ios.ipa Payload
|
||||
- name: Add version to filename
|
||||
run: |
|
||||
APP_VERSION=$(grep "version:" pubspec.yaml | cut -d':' -f2 | tr -d ' ')
|
||||
mkdir -p result
|
||||
mv build/ios/iphoneos/venera-ios.ipa result/venera-ios-$APP_VERSION.ipa
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: app-ios.ipa
|
||||
path: /Users/runner/work/venera/venera/build/ios/iphoneos/venera-ios.ipa
|
||||
name: ios_build
|
||||
path: result/
|
||||
Build_Android:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
@@ -130,7 +141,7 @@ jobs:
|
||||
sudo apt-get update -y
|
||||
sudo apt-get install -y ninja-build libgtk-3-dev webkit2gtk-4.1
|
||||
dart pub global activate flutter_to_debian
|
||||
- run: python3 debian/build.py
|
||||
- run: python3 debian/build.py x64
|
||||
- run: dart run flutter_to_arch
|
||||
- run: |
|
||||
sudo rm -rf build/linux/arch/app.tar.gz
|
||||
@@ -145,19 +156,43 @@ jobs:
|
||||
with:
|
||||
name: arch_build
|
||||
path: build/linux/arch/
|
||||
Build_Linux_ARM64:
|
||||
runs-on: ubuntu-22.04-arm
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Setup Flutter
|
||||
run: |
|
||||
FLUTTER_VERSION=$(grep " flutter:" pubspec.yaml | cut -d':' -f2 | tr -d ' ')
|
||||
sudo apt-get update -y && sudo apt-get upgrade -y;
|
||||
sudo apt-get install -y curl git unzip xz-utils zip libglu1-mesa clang cmake ninja-build pkg-config libgtk-3-dev liblzma-dev libstdc++-12-dev
|
||||
git clone --depth 1 --branch $FLUTTER_VERSION https://github.com/flutter/flutter.git $RUNNER_TEMP/flutter
|
||||
echo "$RUNNER_TEMP/flutter/bin" >> $GITHUB_PATH
|
||||
- name: Install Flutter
|
||||
run: flutter doctor
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
flutter pub get
|
||||
sudo apt-get update -y
|
||||
sudo apt-get install -y ninja-build libgtk-3-dev webkit2gtk-4.1
|
||||
dart pub global activate flutter_to_debian
|
||||
- run: python3 debian/build.py arm64
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: deb_arm64_build
|
||||
path: build/linux/x64/release/debian # This is a bug related to flutter_to_debian, but it's not a big deal.
|
||||
|
||||
Release:
|
||||
runs-on: ubuntu-latest
|
||||
needs: [Build_MacOS, Build_IOS, Build_Android, Build_Windows, Build_Linux]
|
||||
needs: [Build_MacOS, Build_IOS, Build_Android, Build_Windows, Build_Linux, Build_Linux_ARM64]
|
||||
if: github.event_name == 'release' # 仅在 push 事件时执行
|
||||
steps:
|
||||
- uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: venera.dmg
|
||||
name: macos_build
|
||||
path: outputs
|
||||
- uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: app-ios.ipa
|
||||
name: ios_build
|
||||
path: outputs
|
||||
- uses: actions/download-artifact@v4
|
||||
with:
|
||||
@@ -175,6 +210,10 @@ jobs:
|
||||
with:
|
||||
name: arch_build
|
||||
path: outputs
|
||||
- uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: deb_arm64_build
|
||||
path: outputs
|
||||
- uses: softprops/action-gh-release@v2
|
||||
with:
|
||||
tag_name: ${{ github.ref_name }}
|
||||
|
Reference in New Issue
Block a user