From 213179b8c2dee5d9e437efb6a3110a2fd7ba50cf Mon Sep 17 00:00:00 2001 From: nyne Date: Sun, 17 Nov 2024 18:25:18 +0800 Subject: [PATCH] update workflow --- .github/workflows/linux.yml | 33 ---------------- .github/workflows/main.yml | 79 ++++++++++++++++++++++++++++++++++++- 2 files changed, 77 insertions(+), 35 deletions(-) delete mode 100644 .github/workflows/linux.yml diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml deleted file mode 100644 index 558ea6f..0000000 --- a/.github/workflows/linux.yml +++ /dev/null @@ -1,33 +0,0 @@ -name: Build Linux -run-name: Build Linux -on: - workflow_dispatch: {} -jobs: - Build_Linux: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: subosito/flutter-action@v2 - with: - channel: 'stable' - flutter-version-file: pubspec.yaml - architecture: x64 - - run: | - 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: dart run flutter_to_arch - - run: | - sudo rm -rf build/linux/arch/app.tar.gz - sudo rm -rf build/linux/arch/pkg - sudo rm -rf build/linux/arch/src - sudo rm -rf build/linux/arch/PKGBUILD - - uses: actions/upload-artifact@v4 - with: - name: deb_build - path: build/linux/x64/release/debian - - uses: actions/upload-artifact@v4 - with: - name: arch_build - path: build/linux/arch/ \ No newline at end of file diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 8254751..8d3f910 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,5 +1,5 @@ -name: Build IOS -run-name: Build IOS +name: Build ALL +run-name: Build ALL on: workflow_dispatch: {} jobs: @@ -63,3 +63,78 @@ jobs: with: name: app-ios.ipa path: /Users/runner/work/venera/venera/build/ios/iphoneos/venera-ios.ipa + Build_Android: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: subosito/flutter-action@v2 + with: + channel: "stable" + flutter-version-file: pubspec.yaml + architecture: x64 + - name: Decode and install certificate + env: + STORE_FILE: ${{ secrets.ANDROID_KEYSTORE }} + PROPERTY_FILE: ${{ secrets.ANDROID_KEY_PROPERTIES }} + run: | + echo "$STORE_FILE" | base64 --decode > android/keystore.jks + echo "$PROPERTY_FILE" | base64 --decode > android/key.properties + - run: flutter pub get + - run: flutter build apk --release + - uses: actions/upload-artifact@v4 + with: + name: apks + path: build/app/outputs/apk/release + Build_Windows: + runs-on: windows-latest + steps: + - uses: actions/checkout@v3 + - uses: subosito/flutter-action@v2 + with: + channel: "stable" + flutter-version-file: pubspec.yaml + architecture: x64 + - name: install inno setup + run: | + winget install -h --id JRSoftware.InnoSetup -e -s winget + $inno_path = "C:\Users\$env:UserName\AppData\Local\Programs\Inno Setup 6" + wget "https://raw.githubusercontent.com/kira-96/Inno-Setup-Chinese-Simplified-Translation/refs/heads/main/ChineseSimplified.isl" -OutFile "$inno_path\Languages\ChineseSimplified.isl" + - run: flutter pub get + - name: build + run: | + $inno_path = "C:\Users\$env:UserName\AppData\Local\Programs\Inno Setup 6" + $env:PATH += ";$inno_path" + python windows/build.py + - uses: actions/upload-artifact@v4 + with: + name: windows_build + path: build/windows/Venera-* + Build_Linux: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: subosito/flutter-action@v2 + with: + channel: 'stable' + flutter-version-file: pubspec.yaml + architecture: x64 + - run: | + 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: dart run flutter_to_arch + - run: | + sudo rm -rf build/linux/arch/app.tar.gz + sudo rm -rf build/linux/arch/pkg + sudo rm -rf build/linux/arch/src + sudo rm -rf build/linux/arch/PKGBUILD + - uses: actions/upload-artifact@v4 + with: + name: deb_build + path: build/linux/x64/release/debian + - uses: actions/upload-artifact@v4 + with: + name: arch_build + path: build/linux/arch/ +