Skip to content

Commit

Permalink
Merge changes from butterfly project
Browse files Browse the repository at this point in the history
  • Loading branch information
CodeDoctorDE committed Oct 20, 2023
1 parent ec1c5e5 commit eeff292
Show file tree
Hide file tree
Showing 20 changed files with 9,841 additions and 13,971 deletions.
204 changes: 111 additions & 93 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- name: 🔧 Setup java
uses: actions/setup-java@v3
with:
java-version: "11"
java-version: "17"
distribution: "adopt"
- name: Get flutter version
run: |
Expand All @@ -23,7 +23,7 @@ jobs:
- uses: subosito/flutter-action@v2
with:
flutter-version: ${{ env.FLUTTER_VERSION }}
channel: 'any'
channel: 'master'
- name: 📦 Get dependencies
run: |
flutter clean
Expand Down Expand Up @@ -70,7 +70,7 @@ jobs:
- uses: subosito/flutter-action@v2
with:
flutter-version: ${{ env.FLUTTER_VERSION }}
channel: 'any'
channel: 'master'
- name: ✅ Enable platforms
run: flutter config --enable-windows-desktop
- name: 📦 Get dependencies
Expand All @@ -96,13 +96,13 @@ jobs:
# flutter pub run msix:create
- name: Copy portable start script
run: |
cp scripts/start.bat build/windows/runner/Release/
cp scripts/start.bat build/windows/x64/runner/Release/
- name: Archive
uses: actions/upload-artifact@v3
with:
name: windows-build
path: |
app/build/windows/runner/Release/**
app/build/windows/x64/runner/Release/**
- name: Archive
uses: actions/upload-artifact@v3
with:
Expand Down Expand Up @@ -139,15 +139,16 @@ jobs:
patchelf \
alien \
libsecret-1-dev \
libjsoncpp-dev
libjsoncpp-dev \
rpm
- name: Get flutter version
run: |
FLUTTER_VERSION=$(cat ../FLUTTER_VERSION)
echo "FLUTTER_VERSION=${FLUTTER_VERSION}" >> $GITHUB_ENV
- uses: subosito/flutter-action@v2
with:
flutter-version: ${{ env.FLUTTER_VERSION }}
channel: 'any'
channel: 'master'
- name: ✅ Enable platforms
run: flutter config --enable-linux-desktop
- name: 📦 Get dependencies
Expand All @@ -173,11 +174,9 @@ jobs:
cp -fr build/linux/x64/release/bundle linux/debian/usr/bin
dpkg-deb --build --root-owner-group linux/debian
cp linux/*.deb linwood-flow-linux.deb
#- name: Build .rpm executable
# run: |
# cd app
# alien -r linwood-flow-linux.deb
# mv linwood-flow*.rpm linwood-flow-linux.rpm
- name: Build .rpm executable
run: |
bash scripts/build-rpm.sh
- name: Build .AppImage executable
run: |
wget -O appimage-builder-x86_64.AppImage https://github.com/AppImageCrafters/appimage-builder/releases/download/v1.1.0/appimage-builder-1.1.0-x86_64.AppImage
Expand Down Expand Up @@ -209,12 +208,12 @@ jobs:
name: linux-deb
path: |
app/linwood-flow-linux.deb
#- name: Archive .rpm
# uses: actions/upload-artifact@v3
# with:
# name: linux-rpm
# path: |
# app/linwood-flow-linux.rpm
- name: Archive .rpm
uses: actions/upload-artifact@v3
with:
name: linux-rpm
path: |
app/build/linwood-flow-linux.rpm
- name: Archive .AppImage
uses: actions/upload-artifact@v3
with:
Expand Down Expand Up @@ -260,7 +259,7 @@ jobs:
- uses: subosito/flutter-action@v2
with:
flutter-version: ${{ env.FLUTTER_VERSION }}
channel: 'any'
channel: 'master'
- name: ✅ Enable platforms
run: flutter config --enable-linux-desktop
- name: 📦 Get dependencies
Expand Down Expand Up @@ -309,58 +308,76 @@ jobs:
with:
name: linux-alternative-portable
path: app/build/linux/x64/release/bundle
#build-macos:
# runs-on: macos-latest
# defaults:
# run:
# working-directory: app
# steps:
# - name: ⬆️ Checkout
# uses: actions/checkout@v4
# - name: Get flutter version
# run: |
# FLUTTER_VERSION=$(cat ../FLUTTER_VERSION)
# echo "FLUTTER_VERSION=${FLUTTER_VERSION}" >> $GITHUB_ENV
# - uses: subosito/flutter-action@v2
# with:
# flutter-version: ${{ env.FLUTTER_VERSION }}
# channel: 'any'
# - name: ✅ Enable platforms
# run: flutter config --enable-macos-desktop
# - name: 📦 Get dependencies
# run: |
# flutter clean
# flutter pub get
# flutter doctor -v
# - name: 🏭 Build
# run: |
# flutter build macos -v
# - name: Archive
# uses: actions/upload-artifact@v3
# with:
# name: macos-build
# path: |
# app/build/macos/Build/Products/Release/flow.app
#build-snap:
# name: Build Snap
# runs-on: ubuntu-latest
# strategy:
# matrix:
# architecture:
# - amd64
# steps:
# - uses: actions/checkout@v4
# - uses: docker/setup-qemu-action@v2
# with:
# image: tonistiigi/binfmt@sha256:df15403e06a03c2f461c1f7938b171fda34a5849eb63a70e2a2109ed5a778bde
# - uses: diddlesnaps/snapcraft-multiarch-action@v1
# id: build
# with:
# architecture: ${{ matrix.architecture }}
# - uses: actions/upload-artifact@v3
# with:
# name: flow-snap
# path: ${{ steps.build.outputs.snap }}
build-macos:
runs-on: macos-latest
defaults:
run:
working-directory: app
steps:
- name: ⬆️ Checkout
uses: actions/checkout@v4
- name: Get flutter version
run: |
FLUTTER_VERSION=$(cat ../FLUTTER_VERSION)
echo "FLUTTER_VERSION=${FLUTTER_VERSION}" >> $GITHUB_ENV
- uses: subosito/flutter-action@v2
with:
flutter-version: ${{ env.FLUTTER_VERSION }}
channel: 'master'
- name: ✅ Enable platforms
run: flutter config --enable-macos-desktop
- name: 📦 Get dependencies
run: |
flutter clean
flutter pub get
flutter doctor -v
- name: 🏭 Build
run: |
flutter build macos -v --release
- name: Zip file
working-directory: app/build/macos/Build/Products/Release
run: zip --symlinks -qr linwood-flow-macos.zip flow.app
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: '18'
- name: Install appdmg
run: npm install -g appdmg
- name: Create dmg
run: |
appdmg DmgSetup.json linwood-flow-macos.dmg
- name: Archive
uses: actions/upload-artifact@v3
with:
name: macos-build
path: |
app/build/macos/Build/Products/Release/linwood-flow-macos.zip
- name: Archive
uses: actions/upload-artifact@v3
with:
name: macos-dmg
path: |
app/linwood-flow-macos.dmg
# build-snap:
# name: Build Snap
# runs-on: ubuntu-latest
# strategy:
# matrix:
# architecture:
# - amd64
# steps:
# - uses: actions/checkout@v4
# - uses: docker/setup-qemu-action@v2
# with:
# image: tonistiigi/binfmt@sha256:df15403e06a03c2f461c1f7938b171fda34a5849eb63a70e2a2109ed5a778bde
# - uses: diddlesnaps/snapcraft-multiarch-action@v1
# id: build
# with:
# architecture: ${{ matrix.architecture }}
# - uses: actions/upload-artifact@v3
# with:
# name: flow-snap
# path: ${{ steps.build.outputs.snap }}
deploy:
runs-on: ubuntu-22.04
if: github.event_name == 'push'
Expand All @@ -372,7 +389,7 @@ jobs:
- build-windows
- build-linux
- build-flatpak
#- build-macos
- build-macos
steps:
- name: ⬆️ Checkout
uses: actions/checkout@v4
Expand Down Expand Up @@ -407,32 +424,30 @@ jobs:
- uses: actions/download-artifact@v3
with:
name: linux-deb
#- uses: actions/download-artifact@v3
# with:
# name: linux-rpm
- uses: actions/download-artifact@v3
with:
name: linux-rpm
- uses: actions/download-artifact@v3
with:
name: linux-appimage
#- uses: actions/download-artifact@v3
# with:
# name: linux-flatpak
- uses: actions/download-artifact@v3
with:
name: linux-alternative-portable
path: linux-alternative-portable/
- uses: actions/download-artifact@v3
with:
name: windows-setup
#- uses: actions/download-artifact@v3
# with:
# name: macos-build
# path: macos-build/
- uses: actions/download-artifact@v3
with:
name: macos-build
- uses: actions/download-artifact@v3
with:
name: macos-dmg
- name: 📦 Zip artifacts
run: |
zip -r linwood-flow-windows.zip windows-build/*
tar -C linux-build -czf linwood-flow-linux.tar.gz .
tar -C linux-alternative-portable -czf linwood-flow-linux-alternative.tar.gz .
# tar -C macos-build -czf linwood-flow-macos.tar.gz .
- name: Configure git
if: ${{ github.ref == 'refs/heads/develop' || github.ref == 'refs/heads/main' }}
run: |
Expand All @@ -454,9 +469,10 @@ jobs:
linwood-flow-linux.tar.gz
linwood-flow-linux-alternative.tar.gz
linwood-flow-linux.deb
linwood-flow-linux.rpm
linwood-flow-linux.AppImage
# linwood-flow-macos.tar.gz
# linwood-flow-linux.flatpak
linwood-flow-macos.zip
linwood-flow-macos.dmg
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: 🚀 Deploy nightly
Expand All @@ -473,9 +489,10 @@ jobs:
linwood-flow-linux.tar.gz
linwood-flow-linux-alternative.tar.gz
linwood-flow-linux.deb
linwood-flow-linux.rpm
linwood-flow-linux.AppImage
# linwood-flow-macos.tar.gz
# linwood-flow-linux.flatpak
linwood-flow-macos.zip
linwood-flow-macos.dmg
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Release
Expand All @@ -490,9 +507,10 @@ jobs:
linwood-flow-linux.tar.gz
linwood-flow-linux-alternative.tar.gz
linwood-flow-linux.deb
linwood-flow-linux.rpm
linwood-flow-linux.AppImage
# linwood-flow-macos.tar.gz
# linwood-flow-linux.flatpak
linwood-flow-macos.zip
linwood-flow-macos.dmg
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
deploy-to-play-store:
Expand Down Expand Up @@ -526,7 +544,7 @@ jobs:
- name: 🔧 Setup java
uses: actions/setup-java@v3
with:
java-version: "11"
java-version: "17"
distribution: "adopt"
- name: Get flutter version
run: |
Expand All @@ -535,14 +553,14 @@ jobs:
- uses: subosito/flutter-action@v2
with:
flutter-version: ${{ env.FLUTTER_VERSION }}
channel: 'any'
channel: 'master'
- name: 📦 Get dependencies
run: |
flutter pub get
- name: Setup Fastlane
uses: ruby/setup-ruby@v1
with:
ruby-version: "3.2.1"
ruby-version: "3.2.2"
bundler-cache: true
working-directory: app/android
- name: 🚀 Deploy to Play Store
Expand Down Expand Up @@ -577,4 +595,4 @@ jobs:
identifier: LinwoodDev.Flow.Nightly
version: ${{ needs.deploy.outputs.version }}
release-tag: v${{ needs.deploy.outputs.version }}
token: ${{ secrets.CI_PAT }}
token: ${{ secrets.CI_PAT }}
2 changes: 1 addition & 1 deletion FLUTTER_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.13.3
3.16.0-0.2.pre
2 changes: 1 addition & 1 deletion api/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,5 @@ dev_dependencies:
build_runner: ^2.4.6
freezed: ^2.4.2
json_serializable: ^6.7.0
lints: ^2.1.1
lints: ^3.0.0
test: ^1.24.4
9 changes: 9 additions & 0 deletions app/DmgSetup.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"title": "Linwood Flow",
"icon": "build/macos/Build/Products/Release/flow.app/Contents/Resources/AppIcon.icns",
"background-color": "#1b1b1d",
"contents": [
{ "x": 448, "y": 344, "type": "link", "path": "/Applications" },
{ "x": 192, "y": 344, "type": "file", "path": "build/macos/Build/Products/Release/flow.app" }
]
}
2 changes: 1 addition & 1 deletion app/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ Page<void> Function(BuildContext, GoRouterState) _fadeTransitionBuilder(
}

class FlowApp extends StatelessWidget {
FlowApp({Key? key}) : super(key: key);
FlowApp({super.key});

@override
Widget build(BuildContext context) {
Expand Down
2 changes: 1 addition & 1 deletion app/macos/Flutter/GeneratedPluginRegistrant.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
ConnectivityPlugin.register(with: registry.registrar(forPlugin: "ConnectivityPlugin"))
DynamicColorPlugin.register(with: registry.registrar(forPlugin: "DynamicColorPlugin"))
FlutterSecureStoragePlugin.register(with: registry.registrar(forPlugin: "FlutterSecureStoragePlugin"))
FLTPackageInfoPlusPlugin.register(with: registry.registrar(forPlugin: "FLTPackageInfoPlusPlugin"))
FPPPackageInfoPlusPlugin.register(with: registry.registrar(forPlugin: "FPPPackageInfoPlusPlugin"))
PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin"))
ScreenRetrieverPlugin.register(with: registry.registrar(forPlugin: "ScreenRetrieverPlugin"))
SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin"))
Expand Down
Loading

0 comments on commit eeff292

Please sign in to comment.