Skip to content

v0.2.0

v0.2.0 #216

Workflow file for this run

name: build
on:
pull_request:
push:
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build-macos:
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- uses: subosito/flutter-action@v2
with:
channel: 'stable' # or: 'beta', 'dev' or 'master'
cache: true
cache-key: 'flutter-:os:-:channel:-:version:-:arch:-:hash:' # optional, change this to force refresh cache
cache-path: '${{ runner.tool_cache }}/flutter/:channel:-:version:-:arch:' # optional, change this to specify the cache path
- run: flutter config --enable-macos-desktop
- run: flutter build -v macos --release
- run: ditto -c -k --sequesterRsrc --keepParent retro.app $GITHUB_WORKSPACE/retro.zip
working-directory: build/macos/Build/Products/Release
- uses: actions/upload-artifact@v3
with:
name: macos
path: retro.zip
build-windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- uses: subosito/flutter-action@v2
with:
channel: 'stable' # or: 'beta', 'dev' or 'master'
cache: true
cache-key: 'flutter-:os:-:channel:-:version:-:arch:-:hash:' # optional, change this to force refresh cache
cache-path: '${{ runner.tool_cache }}/flutter/:channel:-:version:-:arch:' # optional, change this to specify the cache path
- run: flutter config --enable-windows-desktop
- run: flutter build windows --release
- uses: actions/upload-artifact@v3
with:
name: windows
path: build/windows/x64/runner/Release/*
build-linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install dependencies
run: sudo apt-get update && sudo apt-get install -y ninja-build libgtk-3-dev fuse libfuse2
- uses: subosito/flutter-action@v2
with:
channel: 'stable' # or: 'beta', 'dev' or 'master'
cache: true
cache-key: 'flutter-:os:-:channel:-:version:-:arch:-:hash:' # optional, change this to force refresh cache
cache-path: '${{ runner.tool_cache }}/flutter/:channel:-:version:-:arch:' # optional, change this to specify the cache path
- run: flutter config --enable-linux-desktop
- run: flutter build linux --release
- name: Create AppImage
run: |
wget "https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage"
chmod a+x appimagetool-x86_64.AppImage
# Create AppDir
cp -r build/linux/x64/release/bundle/ retro.AppDir
cp assets/icon-macos.png retro.AppDir/retro.png
# Create AppRun
echo '#!/bin/sh' > retro.AppDir/AppRun
echo 'cd "$(dirname "$0")"' >> retro.AppDir/AppRun
echo 'exec ./retro' >> retro.AppDir/AppRun
chmod a+x retro.AppDir/AppRun
# Create Desktop file
echo '[Desktop Entry]' > retro.AppDir/retro.desktop
echo 'Version=1.0' >> retro.AppDir/retro.desktop
echo 'Name=retro' >> retro.AppDir/retro.desktop
echo 'Exec=retro %u' >> retro.AppDir/retro.desktop
echo 'Icon=retro' >> retro.AppDir/retro.desktop
echo 'Terminal=false' >> retro.AppDir/retro.desktop
echo 'Type=Application' >> retro.AppDir/retro.desktop
echo 'Categories=Utility;' >> retro.AppDir/retro.desktop
# Create AppImage
./appimagetool-x86_64.AppImage retro.AppDir retro.AppImage
- uses: actions/upload-artifact@v3
with:
name: linux
path: retro.AppImage