Skip to content

Commit

Permalink
更新Dev Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaoyaocz committed May 29, 2024
1 parent 464439f commit df6d35d
Show file tree
Hide file tree
Showing 2 changed files with 298 additions and 197 deletions.
137 changes: 127 additions & 10 deletions .github/workflows/publish_app_dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,20 @@ on:
- 'dev'

jobs:
# 打包Android、iOS、Mac
build-mac-ios-android:
runs-on: macos-latest

permissions:
contents: write

steps:
#签出代码
# 签出代码
- uses: actions/checkout@v3
with:
ref: dev

#APK签名设置
# APK签名设置
- name: Download Android keystore
id: android_keystore
uses: timheuer/[email protected]
Expand All @@ -33,27 +34,39 @@ jobs:
echo "keyPassword=${{ secrets.KEY_PASSWORD }}" >> simple_live_app/android/key.properties
echo "keyAlias=${{ secrets.KEY_ALIAS }}" >> simple_live_app/android/key.properties
#设置JAVA环境
# 设置JAVA环境
- uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: "12.x"
cache: 'gradle'
java-version: "17"
cache: "gradle"

#设置Flutter
# 设置Flutter
- name: Flutter action
uses: subosito/flutter-action@v2
with:
flutter-version: '3.19.x'
flutter-version: '3.22.x'
cache: true

#更新Flutter的packages
# 打开MAC Desktop支持
- name: Enable Flutter Desktop
run: flutter config --enable-macos-desktop

# 更新Flutter的packages
- name: Restore packages
run: |
cd simple_live_app
flutter pub get
#打包APK
# 安装appdmg npm install -g appdmg
- name: Install appdmg
run: npm install -g appdmg

# 设置flutter_distributor环境
- name: Install flutter_distributor
run: dart pub global activate flutter_distributor

# 打包APK
- name: Build APK
run: |
cd simple_live_app
Expand Down Expand Up @@ -85,13 +98,117 @@ jobs:
zip -q -r ios_no_sign.ipa Payload
cd ../../..
#上传IPA至Artifacts
# 上传IPA至Artifacts
- name: Upload IPA to Artifacts
uses: actions/upload-artifact@v3
with:
name: ios_no_sign.ipa
path: |
simple_live_app/build/ios/iphoneos/ios_no_sign.ipa
# 打包MAC
- name: Build MacOS
run: |
cd simple_live_app
flutter_distributor package --platform macos --targets dmg,zip --skip-clean
# 上传MAC至Artifacts
- name: Upload MacOS to Artifacts
uses: actions/upload-artifact@v3
with:
name: mac.dmg
path: |
build/dist/*/*.dmg
build/dist/*/*.zip
#完成
- run: echo "🍏 This job's status is ${{ job.status }}."

# 打包Linux
build-linux:
runs-on: ubuntu-22.04
permissions:
contents: write
steps:
# 签出代码
- uses: actions/checkout@v3
with:
ref: dev
# 设置Flutter环境
- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: "3.22.x"
cache: true
# 安装依赖
- name: Update apt-get
run: sudo apt-get update
- name: Install Dependencies
run: sudo apt-get install -y clang cmake ninja-build pkg-config libgtk-3-dev liblzma-dev libmpv-dev mpv
# 打开Linux Desktop支持
- name: Enable Flutter Desktop
run: flutter config --enable-linux-desktop
# 更新Flutter的packages
- name: Restore Packages
run: |
cd simple_live_app
flutter pub get
# 设置flutter_distributor环境
- name: Install flutter_distributor
run: dart pub global activate flutter_distributor
# build Linux ZIP\DMG
- name: Build Linux
run: |
cd simple_live_app
flutter_distributor package --platform linux --targets deb,zip --skip-clean
# 上传MAC至Artifacts
- name: Upload Linux APP to Artifacts
uses: actions/upload-artifact@v3
with:
name: linux.deb
path: |
build/dist/*/*.deb
build/dist/*/*.zip
#完成
- run: echo "🍏 Linux job's status is ${{ job.status }}."

# 打包Windows
build-windows:
runs-on: windows-latest
permissions:
contents: write
steps:
# 签出代码
- uses: actions/checkout@v3
with:
ref: dev
# 设置Flutter环境
- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: "3.22.x"
cache: true
- name: Enable Flutter Desktop
run: flutter config --enable-windows-desktop
- name: Restore Packages
run: |
cd simple_live_app
flutter pub get
# 设置flutter_distributor环境
- name: Install flutter_distributor
run: dart pub global activate flutter_distributor
# build Windows ZIP\MSIX
- name: Build Windows
run: |
cd simple_live_app
flutter_distributor package --platform windows --targets msix,zip --skip-clean
# 上传MAC至Artifacts
- name: Upload Linux APP to Artifacts
uses: actions/upload-artifact@v3
with:
name: linux.msix
path: |
build/dist/*/*.msix
build/dist/*/*.zip
#完成
- run: echo "🍏 Windows job's status is ${{ job.status }}."
Loading

0 comments on commit df6d35d

Please sign in to comment.