Skip to content

Update main.dart - Follow riverpod docs recomendation #48

Update main.dart - Follow riverpod docs recomendation

Update main.dart - Follow riverpod docs recomendation #48

Workflow file for this run

name: Build & Deploy
on:
push:
branches:
- main
jobs:
build-flutter-app:
name: Build and compress Flutter app
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Install Dependencies
run: sudo apt update && sudo apt-get install clang cmake ninja-build pkg-config libgtk-3-dev liblzma-dev
- name: Cache Flutter dependencies
uses: actions/cache@v1
with:
path: /opt/hostedtoolcache/flutter
key: ${{ runner.OS }}-flutter-install-cache-${{ env.flutter_version }}
- name: Install Flutter
uses: subosito/flutter-action@v2
with:
channel: 'stable'
- name: Build
run: |
flutter pub get
flutter build linux
- name: Compress Flutter build
run: tar -C build/linux/x64/release/bundle -cvf DevWidgets-Linux-Portable.tar.gz .
- name: Upload app archive for next steps
uses: actions/upload-artifact@v2
with:
name: DevWidgets-Archive
path: DevWidgets-Linux-Portable.tar.gz
build-flatpak:
name: Build flatpak
needs: build-flutter-app
runs-on: ubuntu-latest
container:
image: bilelmoussaoui/flatpak-github-actions:freedesktop-21.08
options: --privileged
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Download app archive
uses: actions/download-artifact@v3
with:
name: DevWidgets-Archive
- name: Build .flatpak
uses: bilelmoussaoui/flatpak-github-actions/flatpak-builder@v4
with:
bundle: DevWidgets.flatpak
manifest-path: br.com.barros.DevWidgets.yml
- name: Upload .flatpak artifact to workflow
uses: actions/upload-artifact@v2
with:
name: Flatpak artifact
path: DevWidgets.flatpak
build-appimage:
name: Build AppImage
runs-on: ubuntu-latest
needs: build-flutter-app
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Download app archive
uses: actions/download-artifact@v3
with:
name: DevWidgets-Archive
- name: Extract archive
run: |
mkdir portable && tar -xf DevWidgets-Linux-Portable.tar.gz -C $_
- name: Build AppImage
run: |
cp -r portable DevWidgets.AppDir
wget https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage
sudo apt install libfuse2
chmod +x ./appimagetool-x86_64.AppImage
cp -r linux/appimage_assets/* DevWidgets.AppDir/
chmod +x DevWidgets.AppDir/AppRun
./appimagetool-x86_64.AppImage DevWidgets.AppDir/
- name: Upload .AppImage artifact to workflow
uses: actions/upload-artifact@v2
with:
name: AppImage artifact
path: DevWidgets-x86_64.AppImage
automatic_release:
name: Automatic Release
runs-on: ubuntu-latest
needs: [build-appimage, build-flatpak]
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Download Linux portable artifact
uses: actions/download-artifact@v3
with:
name: DevWidgets-Archive
- name: Download AppImage artifact
uses: actions/download-artifact@v3
with:
name: AppImage artifact
- name: Download Flatpak artifact
uses: actions/download-artifact@v3
with:
name: Flatpak artifact
- name: Automatic Release
uses: marvinpinto/action-automatic-releases@latest
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "latest"
prerelease: false
title: "Latest Build"
files: |
DevWidgets-x86_64.AppImage
DevWidgets-Linux-Portable.tar.gz
DevWidgets.flatpak