-
-
Notifications
You must be signed in to change notification settings - Fork 39
69 lines (58 loc) · 2.49 KB
/
flutterci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
name: FlutterCI
on:
push:
branches:
- main
- dev
paths-ignore:
- "README.md"
- "docs/**"
- "assets/screenshot/**"
workflow_dispatch:
release:
types: [created]
jobs:
build-linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup flutter
uses: subosito/flutter-action@master
with:
channel: stable
- name: Install linux app dependencies
run: sudo apt-get update -y && sudo apt-get install -y ninja-build libgtk-3-dev libfuse2
- name: Enable desktop support
run: flutter config --enable-linux-desktop
- name: Build Flutter app
run: flutter build linux
- name: Build Tarball
run: |
install -D assets/appimagepool.svg linux/packaging/usr/share/icons/hicolor/128x128/apps/appimagepool.svg
cp -fr build/linux/x64/release/bundle linux/packaging/usr/bin
mkdir AppDir
cp -r linux/packaging/usr AppDir
ln -sr AppDir/usr/bin/appimagepool AppDir/appimagepool
tar czf appimagepool-${{ github.event_name == 'release' && github.event.release.tag_name || 'continuous' }}-x86_64.tar.gz -C AppDir/ .
- name: Build AppImage
run: |
echo '#!/bin/sh
cd "$(dirname "$0")"
exec ./appimagepool' > AppDir/AppRun
chmod +x AppDir/AppRun
ln -sr AppDir/usr/share/icons/hicolor/128x128/apps/appimagepool.svg AppDir/appimagepool.svg
cp AppDir/usr/share/applications/appimagepool.desktop AppDir/appimagepool.desktop
curl -L https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage -o appimagetool-x86_64.AppImage
chmod +x appimagetool-x86_64.AppImage
ARCH=x86_64 ./appimagetool-x86_64.AppImage AppDir/ appimagepool-${{ github.event_name == 'release' && github.event.release.tag_name || 'continuous' }}-x86_64.AppImage
- name: App tar sha256 sum
run: sha256sum appimagepool-*-x86_64.tar.gz
- uses: svenstaro/upload-release-action@latest
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ./appimagepool-*
file_glob: true
prerelease: ${{ github.event_name != 'release' }}
release_name: ${{ github.event_name == 'release' && github.event.release.name || 'Development Build' }}
tag: ${{ github.event_name == 'release' && github.event.release.tag_name || 'continuous' }}
overwrite: true