Skip to content

Commit

Permalink
rm workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
danemadsen committed Apr 21, 2024
1 parent c481d92 commit 9ad0245
Show file tree
Hide file tree
Showing 7 changed files with 212 additions and 228 deletions.
75 changes: 64 additions & 11 deletions .github/workflows/build-android.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,66 @@
name: Build Android

name: Reusable Build Android
on:
push:
branches:
- main
- dev

workflow_call:
inputs:
flutter_version:
required: true
type: string

jobs:
build:
uses: ./.github/workflows/reusable-build-android.yml
with:
flutter_version: '3.19.5'
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: recursive

- name: Set up JDK 17
uses: actions/setup-java@v2
with:
java-version: '17'
distribution: 'adopt'

- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: ${{ inputs.flutter_version }}

- name: Decode Keystore File
env:
KEYSTORE: ${{ secrets.KEYSTORE }}
run: echo "$KEYSTORE" | base64 --decode > android/app/key.jks

- name: Create key.properties
run: |
echo "storeFile=key.jks" > android/key.properties
echo "storePassword=${{ secrets.STORE_PASSWORD }}" >> android/key.properties
echo "keyPassword=${{ secrets.KEY_PASSWORD }}" >> android/key.properties
echo "releasePassword=${{ secrets.KEY_PASSWORD }}" >> android/key.properties
echo "keyAlias=${{ secrets.KEY_ALIAS }}" >> android/key.properties
echo "releaseAlias=${{ secrets.KEY_ALIAS }}" >> android/key.properties
- name: Setup Flutter
run: |
flutter config --no-analytics
flutter pub get
- name: Build APK
run: |
flutter build apk --split-per-abi
- name: Upload APK
uses: actions/upload-artifact@v4
with:
name: maid-android-apk
path: build/app/outputs/apk/release

- name: Build appbundle
run: |
flutter build appbundle
- name: Upload AAB
uses: actions/upload-artifact@v4
with:
name: maid-android-aab
path: build/app/outputs/bundle/release/app-release.aab
97 changes: 86 additions & 11 deletions .github/workflows/build-linux.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,88 @@
name: Build Linux

name: Reusable Build Linux
on:
push:
branches:
- main
- dev

workflow_call:
inputs:
flutter_version:
required: true
type: string

jobs:
build:
uses: ./.github/workflows/reusable-build-linux.yml
with:
flutter_version: '3.19.5'
build-linux:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: recursive

- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: ${{ inputs.flutter_version }}

- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y cmake ninja-build pkg-config libgtk-3-dev libvulkan-dev
- name: Build Linux App
run: |
flutter pub get
flutter build linux
- name: Upload Linux Build
uses: actions/upload-artifact@v4
with:
name: maid-linux
path: build/linux/x64/release/bundle

create-appimage:
needs: build-linux
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Download Linux Build
uses: actions/download-artifact@v4
with:
name: maid-linux
path: maid-linux

- name: Install AppImage tools and dependencies
run: |
sudo apt-get update
sudo apt-get install -y appstream util-linux libfuse2
- name: Download and Install AppImageTool
run: |
wget https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage
chmod +x appimagetool-x86_64.AppImage
sudo mv appimagetool-x86_64.AppImage /usr/local/bin/appimagetool
- name: Prepare AppDir
run: |
mkdir AppDir
cp -r maid-linux/* AppDir/
cp assets/maid.png AppDir/icon.png
echo '[Desktop Entry]
Name=Maid
Exec=maid
Icon=icon
Type=Application
Categories=Utility;' > AppDir/maid.desktop
chmod +x AppDir/maid
echo '#!/bin/bash
HERE="$(dirname "$(readlink -f "${0}")")"
exec "$HERE/maid" "$@"' > AppDir/AppRun
chmod +x AppDir/AppRun
- name: Create AppImage
run: |
appimagetool AppDir maid.AppImage
- name: Upload AppImage
uses: actions/upload-artifact@v4
with:
name: maid-appimage
path: ./maid.AppImage
50 changes: 39 additions & 11 deletions .github/workflows/build-windows.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,41 @@
name: Build Windows

name: Reusable Build Windows
on:
push:
branches:
- main
- dev

jobs:
workflow_call:
inputs:
flutter_version:
required: true
type: string
jobs:
build:
uses: ./.github/workflows/reusable-build-windows.yml
with:
flutter_version: '3.19.5'
runs-on: windows-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: recursive

- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: ${{ inputs.flutter_version }}

- name: Install dependencies
run: |
choco install -y cmake ninja
- name: Install Vulkan SDK
uses: humbletim/[email protected]
with:
version: latest
cache: true

- name: Build Windows App
run: |
flutter pub get
flutter build windows
- name: Upload Windows Build
uses: actions/upload-artifact@v4
with:
name: maid-windows
path: build/windows/x64/bundle
23 changes: 23 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Build Maid

on:
push:
branches:
- main
- dev

jobs:
build-android:
uses: ./.github/workflows/build-android.yml
with:
flutter_version: '3.19.5'

build-linux:
uses: ./.github/workflows/build-linux.yml
with:
flutter_version: '3.19.5'

build-windows:
uses: ./.github/workflows/build-windows.yml
with:
flutter_version: '3.19.5'
66 changes: 0 additions & 66 deletions .github/workflows/reusable-build-android.yml

This file was deleted.

Loading

0 comments on commit 9ad0245

Please sign in to comment.