Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Linux]AppImageビルドのサポート #301

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
81 changes: 81 additions & 0 deletions .github/workflows/linux_deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
name: デプロイ(Linux)
on: [workflow_dispatch]
permissions:
contents: write
jobs:
build_for_linux:
name: Linux用ビルド
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Install Flutter Develop dependencies
run: sudo apt install -y clang cmake ninja-build pkg-config libgtk-3-dev liblzma-dev libstdc++-12-dev

- name: Install Flutter
uses: subosito/flutter-action@v2
with:
channel: 'stable'
cache: true

- name: Cache pubspec dependencies
uses: actions/cache@v3
with:
path: |
${{ env.FLUTTER_HOME }}/.pub-cache
**/.packages
**/.flutter-plugins
**/.flutter-plugin-dependencies
**/.dart_tool/package_config.json
key: build-pubspec-${{ hashFiles('**/pubspec.lock') }}
restore-keys: build-pubspec-

- name: Install Flutter Build Tools for Linux
run: sudo apt install -y libsecret-1-dev

- name: Flutter pub get
run: flutter pub get

- name: Get Version
run: echo "VERSION=$(flutter pub run cider version)" >> $GITHUB_ENV

- name: Flutter Build
run: flutter build linux --release

- name: Setup Packaging AppImage
run: |
sudo apt install -y locate libfuse2
wget -O appimagetool "https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage"
chmod +x appimagetool
sudo mv appimagetool /usr/local/bin/
flutter pub global activate flutter_distributor

- name: Packaging AppImage
run: |
flutter_distributor package --platform linux --targets appimage --skip-clean
mv ./dist/$BUMP_VERSION/miria-$BUMP_VERSION-linux.AppImage ./dist/$BUMP_VERSION/miria-$BUMP_VERSION-amd64.AppImage

- name: Upload artifact to release (AppImage)
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: gh release upload v$VERSION ./dist/$BUMP_VERSION/miria-$BUMP_VERSION-amd64.AppImage

- name: Compress App
run: |
cd build/linux/x64/release/bundle
tar -czaf miria-$VERSION-x86_64.tar.gz *

# - name: Upload artifact
# uses: actions/upload-artifacts@v3
# with:
# name: linux-x86_64
# path: build/linux/x64/release/bundle/miria-$VERSION-x86_64.tar.gz

- name: Upload artifact to release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: gh release upload v$VERSION ./build/linux/x64/release/bundle/miria-$VERSION-x86_64.tar.gz

- name: Remove artifact.tar.gz
run: rm build/linux/x64/release/bundle/miria-$VERSION-x86_64.tar.gz
12 changes: 12 additions & 0 deletions linux/packaging/appimage/make_config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
display_name: Miria
icon: assets/images/icon.png
keywords:
- Misskey
- みすきー
- Miria
- みりあ
categories:
- Network
include: []
startup_notify: true
generic_name: Misskey Client Application
6 changes: 3 additions & 3 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -484,13 +484,13 @@ packages:
source: hosted
version: "8.0.0"
flutter_secure_storage_linux:
dependency: transitive
dependency: "direct main"
description:
name: flutter_secure_storage_linux
sha256: "0912ae29a572230ad52d8a4697e5518d7f0f429052fd51df7e5a7952c7efe2a3"
sha256: "3d5032e314774ee0e1a7d0a9f5e2793486f0dff2dd9ef5a23f4e3fb2a0ae6a9e"
url: "https://pub.dev"
source: hosted
version: "1.1.3"
version: "1.2.0"
flutter_secure_storage_macos:
dependency: transitive
description:
Expand Down
1 change: 1 addition & 0 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ dependencies:
colorfilter_generator: ^0.0.8
matrix2d: ^1.0.4
twemoji_v2: ^0.5.3
flutter_secure_storage_linux: ^1.2.0
flutter_image_compress: ^2.0.4

dependency_overrides:
Expand Down