v0.5.8 #9
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build On Release | |
on: | |
release: | |
types: [created] | |
jobs: | |
build-ubuntu: | |
name: "Build web, android, & linux" | |
runs-on: ubuntu-latest | |
steps: | |
# Set up repo and java | |
- name: Clone repository | |
uses: actions/checkout@v4 | |
- name: Set up Flutter | |
uses: subosito/flutter-action@v2 | |
with: | |
channel: stable | |
- name: Set up Java | |
uses: actions/setup-java@v2 | |
with: | |
java-version: 17 | |
distribution: "temurin" | |
# And begin the flutter | |
- name: Install dependencies | |
run: flutter pub get | |
# Build web | |
- name: Build Web | |
run: flutter build web --web-renderer html | |
# Create a zip file for the web build | |
- name: Create web build zip | |
run: | | |
sudo apt-get install -y zip | |
zip -r vup-chat-web.zip build/web | |
# Build linux | |
- name: Build Linux | |
run: | | |
sudo apt-get update -y | |
sudo apt-get install -y ninja-build libgtk-3-dev libnotify-dev | |
flutter build linux | |
cd build/linux/x64/release | |
zip -r ../../../../vup-chat-linux.zip bundle/ | |
cd ../../../.. | |
# Bulid android | |
- name: Build Android | |
run: flutter build apk | |
# Now upload those assets | |
- name: Upload release assets | |
uses: alexellis/upload-assets@0.4.1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
asset_paths: '["./vup-chat-web.zip", "./build/app/outputs/flutter-apk/app-release.apk", "vup-chat-linux.zip"]' | |
# TODO: Add Windows build | |
# TODO: Add MacOS & iOS bilds |