Skip to content

remove unnecessary static prop #36

remove unnecessary static prop

remove unnecessary static prop #36

name: Build and Release Desktop Platforms
on:
push:
branches:
- master
env:
FLUTTER_VERSION: "3.16.x"
jobs:
build_on_linux:
name: Build on Linux
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- uses: subosito/[email protected]
with:
flutter-version: ${{env.FLUTTER_VERSION}}
channel: "stable"
- name: Create env.json
id: create-json
uses: jsdaniell/[email protected]
with:
name: "env.json"
json: '{"SUPABASE_URL":"${{secrets.SUPABASE_URL}}", "SUPABASE_ANON":"${{secrets.SUPABASE_ANON}}"}'
- name: Enable desktop platform
run: |
flutter config --enable-linux-desktop
flutter config --enable-windows-desktop
flutter config --enable-macos-desktop
flutter config --enable-web
- name: Install project dependencies
run: flutter pub get
- name: Generate intermediates
run: flutter pub run build_runner build --delete-conflicting-outputs
- name: Install os dependencies
run: sudo apt-get install clang cmake ninja-build pkg-config libgtk-3-dev libsecret-1-dev liblzma-dev libjsoncpp-dev libstdc++-12-dev libunwind-dev libgstreamer-plugins-bad1.0-dev gstreamer1.0-plugins-good
- name: Enable linux build
run: flutter config --enable-linux-desktop
- name: Get version
id: version
uses: NiklasLehnfeld/flutter-version-number-action@main
- name: Build artifacts
run: flutter build linux --release --dart-define-from-file=env.json
- name: Package Release files
uses: thedoctor0/zip-release@master
with:
type: "zip"
filename: app_creaty-${{ steps.version.outputs.version-number }}-linux.zip
directory: build/linux/x64/release/bundle
- name: Release to github
uses: softprops/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
name: v${{ steps.version.outputs.version-number }}
tag_name: ${{ steps.version.outputs.version-number }}
generate_release_notes: true
files: build/linux/x64/release/bundle/app_creaty-${{ steps.version.outputs.version-number }}-linux.zip
build_on_windows:
name: Build on Windows
runs-on: windows-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- uses: subosito/[email protected]
with:
flutter-version: ${{env.FLUTTER_VERSION}}
channel: "stable"
- name: Create env.json
id: create-json
uses: jsdaniell/[email protected]
with:
name: "env.json"
json: '{"SUPABASE_URL":"${{secrets.SUPABASE_URL}}", "SUPABASE_ANON":"${{secrets.SUPABASE_ANON}}"}'
- name: Enable desktop platform
run: |
flutter config --enable-linux-desktop
flutter config --enable-windows-desktop
flutter config --enable-macos-desktop
flutter config --enable-web
- name: Install project dependencies
run: flutter pub get
- name: Generate intermediates
run: flutter pub run build_runner build --delete-conflicting-outputs
- name: Get version
id: version
uses: NiklasLehnfeld/flutter-version-number-action@main
- name: Build artifacts
run: flutter build windows --release --dart-define-from-file=env.json
- name: Package Release
uses: thedoctor0/zip-release@master
with:
type: "zip"
filename: app_creaty-${{ steps.version.outputs.version-number }}-windows.zip
directory: build/windows/runner/Release
- name: Release to github
uses: softprops/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
name: v${{ steps.version.outputs.version-number }}
tag_name: ${{ steps.version.outputs.version-number }}
generate_release_notes: true
files: build/windows/runner/Release/app_creaty-${{ steps.version.outputs.version-number }}-windows.zip
build_on_macos:
name: Build on macOS
runs-on: macos-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- uses: subosito/[email protected]
with:
flutter-version: ${{env.FLUTTER_VERSION}}
channel: "stable"
- name: Create env.json
id: create-json
uses: jsdaniell/[email protected]
with:
name: "env.json"
json: '{"SUPABASE_URL":"${{secrets.SUPABASE_URL}}", "SUPABASE_ANON":"${{secrets.SUPABASE_ANON}}"}'
- name: Enable desktop platform
run: |
flutter config --enable-linux-desktop
flutter config --enable-windows-desktop
flutter config --enable-macos-desktop
flutter config --enable-web
- name: Install project dependencies
run: flutter pub get
- name: Generate intermediates
run: flutter pub run build_runner build --delete-conflicting-outputs
- name: Get version
id: version
uses: NiklasLehnfeld/flutter-version-number-action@main
- name: Build artifacts
run: flutter build macos --release --no-tree-shake-icons --dart-define-from-file=env.json
- name: Package Release
uses: thedoctor0/zip-release@master
with:
type: "zip"
filename: app_creaty-${{steps.version.outputs.version-number}}-macos.zip
directory: build/macos/Build/Products/Release
- name: Release to github
uses: softprops/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
name: ${{ steps.version.outputs.version-number }}
tag_name: ${{ steps.version.outputs.version-number }}
generate_release_notes: true
files: build/macos/Build/Products/Release/app_creaty-${{steps.version.outputs.version-number}}-macos.zip