Skip to content

Commit

Permalink
ci: desktop build
Browse files Browse the repository at this point in the history
  • Loading branch information
CDN18 committed Dec 10, 2023
1 parent 8bb69c7 commit 7f61f35
Showing 1 changed file with 74 additions and 0 deletions.
74 changes: 74 additions & 0 deletions .github/workflows/desktop.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
name: Build Desktop

on:
workflow_dispatch:
push:
branches:
- main

jobs:
linux:
name: Linux
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: cat .github/workflows/versions.env >> $GITHUB_ENV
- uses: subosito/flutter-action@v2
with:
flutter-version: ${{ env.FLUTTER_VERSION }}
cache: true
- name: Install dependencies
run: sudo apt-get update && sudo apt-get install curl clang cmake ninja-build pkg-config libgtk-3-dev libblkid-dev liblzma-dev libjsoncpp-dev cmake-data libsecret-1-dev libsecret-1-0 librhash0 -y
- run: flutter pub get
- run: flutter build linux --release --target-platform linux-x64
- name: Create archive
run: tar -czf fluffychat-linux-x64.tar.gz -C build/linux/x64/release/bundle/ .
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: fluffychat-linux-x64
path: fluffychat-linux-x64.tar.gz

windows:
name: Windows
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- run: cat .github/workflows/versions.env >> $GITHUB_ENV
- uses: subosito/flutter-action@v2
with:
flutter-version: ${{ env.FLUTTER_VERSION }}
cache: true
- name: Install dependencies
run: choco install -y ninja cmake
- run: flutter pub get
- run: flutter build windows --release --target-platform windows-x64
- name: Create archive
run: 7z a fluffychat-windows-x64.zip build\windows\x64\release\bundle
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: fluffychat-windows-x64
path: fluffychat-windows-x64.zip

macos:
name: macOS
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- run: cat .github/workflows/versions.env >> $GITHUB_ENV
- uses: subosito/flutter-action@v2
with:
flutter-version: ${{ env.FLUTTER_VERSION }}
cache: true
- name: Install dependencies
run: brew install ninja cmake
- run: flutter pub get
- run: flutter build macos --release --target-platform darwin-x64
- name: Create archive
run: tar -czf fluffychat-macos-x64.tar.gz -C build/macos/Build/Products/Release/ .
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: fluffychat-macos-x64
path: fluffychat-macos-x64.tar.gz

0 comments on commit 7f61f35

Please sign in to comment.