-
Notifications
You must be signed in to change notification settings - Fork 1
62 lines (58 loc) · 2.26 KB
/
release.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
name: Release
on:
push:
tags:
- '*'
permissions:
contents: write
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v2
with:
distribution: 'zulu'
java-version: '11'
- uses: subosito/flutter-action@v2
with:
channel: 'stable'
- run: |
sudo apt-get update -y
sudo apt-get install -y ninja-build libgtk-3-dev locate rpm patchelf fuse libfuse2
- run: |
wget -O appimagetool "https://github.com/AppImage/AppImageKit/releases/download/13/appimagetool-x86_64.AppImage"
chmod +x appimagetool
sudo mv appimagetool /usr/local/bin/
- run: dart pub global activate flutter_distributor
- run: flutter config --enable-linux-desktop
- run: flutter pub get
- run: flutter pub run build_runner build --delete-conflicting-outputs
# the release command lines below fails to find the AppImage in the file system because it searches in a
# case insensitive way (*.appimage instead of *.AppImage). This is my workaround. Issue: https://github.com/leanflutter/flutter_distributor/issues/118
- run: flutter_distributor package --platform linux --targets appimage
- run: flutter_distributor publish --targets=github --github-repo-owner=synyx --github-repo-name=synTrack --path="$(echo ./dist/*/*.AppImage)"
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
- run: flutter_distributor release --name release --skip-jobs linux-appimage,darwin-dmg
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
release-macos:
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- uses: subosito/flutter-action@v2
with:
channel: 'stable'
architecture: x64
- uses: actions/setup-node@v3
with:
node-version: 18
- run: npm install -g appdmg
- run: dart pub global activate flutter_distributor
- run: flutter config --enable-macos-desktop
- run: flutter pub get
- run: flutter pub run build_runner build --delete-conflicting-outputs
- run: flutter_distributor release --name release --jobs darwin-dmg
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}