Skip to content

Merge pull request #2 from feoh/copilot/fix-android-build-failure #2

Merge pull request #2 from feoh/copilot/fix-android-build-failure

Merge pull request #2 from feoh/copilot/fix-android-build-failure #2

Workflow file for this run

name: Release
on:
push:
tags:
- 'v*.*.*'
permissions:
contents: write
jobs:
build-macos:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- uses: subosito/flutter-action@v2
with:
flutter-version: '3.41.6'
channel: stable
cache: true
- name: Install dependencies
run: flutter pub get
- name: Build macOS
run: flutter build macos --release
- name: Package macOS app
run: |
cd build/macos/Build/Products/Release
zip -r "$GITHUB_WORKSPACE/linkdqueue-macos.zip" linkdqueue.app
- uses: actions/upload-artifact@v4
with:
name: macos
path: linkdqueue-macos.zip
build-linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Linux build dependencies
run: |
sudo apt-get update -y
sudo apt-get install -y \
clang cmake ninja-build pkg-config \
libgtk-3-dev liblzma-dev libstdc++-12-dev \
libsecret-1-dev libjsoncpp-dev
- uses: subosito/flutter-action@v2
with:
flutter-version: '3.41.6'
channel: stable
cache: true
- name: Install dependencies
run: flutter pub get
- name: Build Linux
run: flutter build linux --release
- name: Package Linux app
run: |
tar -czvf linkdqueue-linux.tar.gz \
-C build/linux/x64/release/bundle .
- uses: actions/upload-artifact@v4
with:
name: linux
path: linkdqueue-linux.tar.gz
build-windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: subosito/flutter-action@v2
with:
flutter-version: '3.41.6'
channel: stable
cache: true
- name: Install dependencies
run: flutter pub get
- name: Build Windows
run: flutter build windows --release
- name: Package Windows app
shell: pwsh
run: |
Compress-Archive `
-Path build/windows/x64/runner/Release/* `
-DestinationPath linkdqueue-windows.zip
- uses: actions/upload-artifact@v4
with:
name: windows
path: linkdqueue-windows.zip
build-android:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: '17'
- uses: subosito/flutter-action@v2
with:
flutter-version: '3.41.6'
channel: stable
cache: true
- name: Install dependencies
run: flutter pub get
- name: Build Android APK
run: flutter build apk --release
- name: Rename APK
run: mv build/app/outputs/flutter-apk/app-release.apk linkdqueue-android.apk
- uses: actions/upload-artifact@v4
with:
name: android
path: linkdqueue-android.apk
release:
needs: [build-macos, build-linux, build-windows, build-android]
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v4
with:
path: artifacts
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
files: |
artifacts/macos/linkdqueue-macos.zip
artifacts/linux/linkdqueue-linux.tar.gz
artifacts/windows/linkdqueue-windows.zip
artifacts/android/linkdqueue-android.apk
generate_release_notes: true