From fc3fbf3379fa28f60829124fd53e7c9fb785b3bc Mon Sep 17 00:00:00 2001 From: hackerhgl Date: Mon, 10 Jan 2022 11:17:03 +0500 Subject: [PATCH] Fixed github actions script --- .github/workflows/main.yml | 276 +++++++++++++++++++------------------ 1 file changed, 143 insertions(+), 133 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 2ebda8c..e7a4f46 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -20,17 +20,27 @@ jobs: path: 'app' - name: Install required build tools for linux run: sudo apt-get update && sudo apt-get install clang cmake ninja-build pkg-config libgtk-3-dev libblkid-dev - - name: Build linux release + - name: Configure flutter linux configs run: | - cd app flutter config --enable-linux-desktop flutter config --no-enable-android + - name: Trim vector icons + run: | + cd app flutter pub get dart ./scripts/splitVectorIcons.dart - flutter clean - flutter build linux --release + # flutter clean + - name: Build linux release + run: | + cd app + flutter build linux --release -v + + - name: Compress build + run: | + ls -lah build cd build/linux/release zip -r linux-release.zip bundle + - name: Create linux Release uses: ncipollo/release-action@v1 with: @@ -38,134 +48,134 @@ jobs: token: ${{ secrets.TOKEN }} allowUpdates: true - web: - name: Web - runs-on: ubuntu-latest - steps: - - name: Install Flutter SDK - uses: subosito/flutter-action@v1 - with: - flutter-version: '2.8.1' - - uses: actions/checkout@v2 - with: - fetch-depth: 0 - ref: ${{ github.event.release.tag_name }} - path: 'app' - - run: | - cd app - flutter config --enable-web - flutter config --no-enable-android - flutter pub get - dart ./scripts/splitVectorIcons.dart - flutter build web -t lib/main.web.dart --release - - name: Deploy to Firebase - uses: w9jds/firebase-action@master - with: - args: deploy --only hosting - env: - PROJECT_PATH: 'app' - FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }} + # web: + # name: Web + # runs-on: ubuntu-latest + # steps: + # - name: Install Flutter SDK + # uses: subosito/flutter-action@v1 + # with: + # flutter-version: '2.8.1' + # - uses: actions/checkout@v2 + # with: + # fetch-depth: 0 + # ref: ${{ github.event.release.tag_name }} + # path: 'app' + # - run: | + # cd app + # flutter config --enable-web + # flutter config --no-enable-android + # flutter pub get + # dart ./scripts/splitVectorIcons.dart + # flutter build web -t lib/main.web.dart --release + # - name: Deploy to Firebase + # uses: w9jds/firebase-action@master + # with: + # args: deploy --only hosting + # env: + # PROJECT_PATH: 'app' + # FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }} - android: - name: Android - runs-on: ubuntu-latest - steps: - - name: Install Flutter SDK - uses: subosito/flutter-action@v1 - with: - flutter-version: '2.8.1' - - uses: actions/setup-java@v1 - with: - java-version: '12.x' - - uses: actions/checkout@v2 - with: - fetch-depth: 0 - ref: ${{ github.event.release.tag_name }} - path: 'app' - - run: | - cd app - flutter pub get - dart ./scripts/splitVectorIcons.dart - flutter clean - flutter pub get - flutter build apk - mv build/app/outputs/apk/release/app-release.apk build/app/outputs/apk/release/app-release-noads.apk - flutter build appbundle -t lib/main.mobile.dart - flutter build apk -t lib/main.mobile.dart - - name: Create Android Release - uses: ncipollo/release-action@v1 - with: - artifacts: 'app/build/app/outputs/apk/release/app-release.apk,app/build/app/outputs/bundle/release/app-release.aab,app/build/app/outputs/apk/release/app-release-noads.apk' - token: ${{ secrets.TOKEN }} - allowUpdates: true - - name: Upload to playstore - uses: r0adkll/upload-google-play@v1 - with: - serviceAccountJson: ${{ secrets.PLAYSTORE_ACCOUNT_KEY }} - packageName: com.onemdev.invmovieconcept1 - releaseFile: app/build/app/outputs/bundle/release/app-release.aab - track: production - inAppUpdatePriority: 2 - whatsNewDirectory: distribution/whatsnew - # - name: Upload app bundle - # uses: actions/upload-artifact@v2 - # with: - # name: appbundle - # path: app/build/app/outputs/bundle/release/app-release.aab - macos: - name: MacOS - runs-on: macos-latest - steps: - - name: Install Flutter SDK - uses: subosito/flutter-action@v1 - with: - flutter-version: '2.8.1' - - uses: actions/checkout@v2 - with: - fetch-depth: 0 - ref: ${{ github.event.release.tag_name }} - path: 'app' - - run: | - cd app - flutter config --enable-macos-desktop - flutter config --no-enable-android - dart scripts/mac.pub.dart - flutter pub get - dart ./scripts/splitVectorIcons.dart - flutter build macos -v --release - cd build/macos/Build/Products/Release - ditto -c -k --sequesterRsrc --keepParent invmovieconcept1.app macos-release.zip - - uses: ncipollo/release-action@v1 - with: - artifacts: 'app/build/macOS/Build/Products/Release/macos-release.zip' - token: ${{ secrets.TOKEN }} - allowUpdates: true + # android: + # name: Android + # runs-on: ubuntu-latest + # steps: + # - name: Install Flutter SDK + # uses: subosito/flutter-action@v1 + # with: + # flutter-version: '2.8.1' + # - uses: actions/setup-java@v1 + # with: + # java-version: '12.x' + # - uses: actions/checkout@v2 + # with: + # fetch-depth: 0 + # ref: ${{ github.event.release.tag_name }} + # path: 'app' + # - run: | + # cd app + # flutter pub get + # dart ./scripts/splitVectorIcons.dart + # flutter clean + # flutter pub get + # flutter build apk + # mv build/app/outputs/apk/release/app-release.apk build/app/outputs/apk/release/app-release-noads.apk + # flutter build appbundle -t lib/main.mobile.dart + # flutter build apk -t lib/main.mobile.dart + # - name: Create Android Release + # uses: ncipollo/release-action@v1 + # with: + # artifacts: 'app/build/app/outputs/apk/release/app-release.apk,app/build/app/outputs/bundle/release/app-release.aab,app/build/app/outputs/apk/release/app-release-noads.apk' + # token: ${{ secrets.TOKEN }} + # allowUpdates: true + # - name: Upload to playstore + # uses: r0adkll/upload-google-play@v1 + # with: + # serviceAccountJson: ${{ secrets.PLAYSTORE_ACCOUNT_KEY }} + # packageName: com.onemdev.invmovieconcept1 + # releaseFiles: app/build/app/outputs/bundle/release/*.aab + # track: production + # inAppUpdatePriority: 2 + # whatsNewDirectory: distribution/whatsnew + # # - name: Upload app bundle + # # uses: actions/upload-artifact@v2 + # # with: + # # name: appbundle + # # path: app/build/app/outputs/bundle/release/app-release.aab + # macos: + # name: MacOS + # runs-on: macos-latest + # steps: + # - name: Install Flutter SDK + # uses: subosito/flutter-action@v1 + # with: + # flutter-version: '2.8.1' + # - uses: actions/checkout@v2 + # with: + # fetch-depth: 0 + # ref: ${{ github.event.release.tag_name }} + # path: 'app' + # - run: | + # cd app + # flutter config --enable-macos-desktop + # flutter config --no-enable-android + # dart scripts/mac.pub.dart + # flutter pub get + # dart ./scripts/splitVectorIcons.dart + # flutter build macos -v --release + # cd build/macos/Build/Products/Release + # ditto -c -k --sequesterRsrc --keepParent invmovieconcept1.app macos-release.zip + # - uses: ncipollo/release-action@v1 + # with: + # artifacts: 'app/build/macOS/Build/Products/Release/macos-release.zip' + # token: ${{ secrets.TOKEN }} + # allowUpdates: true - windows: - name: Windows - runs-on: windows-latest - steps: - - name: Install Flutter SDK - uses: subosito/flutter-action@v1 - with: - flutter-version: '2.8.1' - - uses: actions/checkout@v2 - with: - fetch-depth: 0 - ref: ${{ github.event.release.tag_name }} - path: 'app' - - run: | - cd app - flutter config --enable-windows-desktop - flutter config --no-enable-android - flutter pub get - dart .\scripts\splitVectorIcons.dart - flutter build windows --release - cd build\windows\runner - Compress-Archive -Path Release -DestinationPath windows-release.zip - - name: Windows release build for github - uses: ncipollo/release-action@v1 - with: - artifacts: 'app\build\windows\runner\windows-release.zip' - token: ${{ secrets.TOKEN }} - allowUpdates: true + # windows: + # name: Windows + # runs-on: windows-latest + # steps: + # - name: Install Flutter SDK + # uses: subosito/flutter-action@v1 + # with: + # flutter-version: '2.8.1' + # - uses: actions/checkout@v2 + # with: + # fetch-depth: 0 + # ref: ${{ github.event.release.tag_name }} + # path: 'app' + # - run: | + # cd app + # flutter config --enable-windows-desktop + # flutter config --no-enable-android + # flutter pub get + # dart .\scripts\splitVectorIcons.dart + # flutter build windows --release + # cd build\windows\runner + # Compress-Archive -Path Release -DestinationPath windows-release.zip + # - name: Windows release build for github + # uses: ncipollo/release-action@v1 + # with: + # artifacts: 'app\build\windows\runner\windows-release.zip' + # token: ${{ secrets.TOKEN }} + # allowUpdates: true