Skip to content

Commit

Permalink
Update build-and-release workflow
Browse files Browse the repository at this point in the history
- Created a dedicated build step for Windows packages.
- Added installation of OpenJDK using Snap for Linux builds.
  • Loading branch information
svc-design committed Oct 15, 2024
1 parent 93cf9c9 commit 116840a
Showing 1 changed file with 16 additions and 7 deletions.
23 changes: 16 additions & 7 deletions .github/workflows/build-and-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ jobs:
run: |
sudo apt-get update
sudo apt-get install -y snapd
sudo snap install --stable openjdk
sudo snap install flutter --classic
export PATH="$PATH:/snap/bin"
flutter doctor
Expand Down Expand Up @@ -86,26 +87,34 @@ jobs:
run: |
echo "Platform: $PLATFORM, Architecture: $ARCH"
- name: Build Flutter packages
- name: Build Flutter packages for Windows
if: ${{ matrix.platform == 'windows' }}
run: |
flutter build windows --release
env:
PLATFORM: ${{ matrix.platform }}
ARCH: ${{ matrix.arch }}

- name: Build Flutter packages for Linux/Android/macOS/iOS
run: |
case $PLATFORM in
"linux")
flutter build linux --release
;;
"windows")
flutter build windows --release
"android")
flutter build apk --release
;;
"macos")
flutter build macos --release
flutter build ios --release --no-codesign
;;
"android")
flutter build apk --release
;;
"ios")
flutter build ios --release --no-codesign
;;
esac
shell: bash
env:
PLATFORM: ${{ matrix.platform }}
ARCH: ${{ matrix.arch }}

- name: List built files
run: ls -R build
Expand Down

0 comments on commit 116840a

Please sign in to comment.