Skip to content

Commit

Permalink
Fixed github actions script
Browse files Browse the repository at this point in the history
  • Loading branch information
hmziqrs committed Jan 10, 2022
1 parent 2b93b44 commit fc3fbf3
Showing 1 changed file with 143 additions and 133 deletions.
276 changes: 143 additions & 133 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,152 +20,162 @@ 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:
artifacts: 'app/build/linux/release/linux-release.zip'
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

0 comments on commit fc3fbf3

Please sign in to comment.