From e613bcf056930f9d2fb8702cfa67e6354bf14747 Mon Sep 17 00:00:00 2001 From: Npepperlinux Date: Mon, 25 Sep 2023 18:51:18 +0900 Subject: [PATCH 1/4] =?UTF-8?q?Linux=E3=83=93=E3=83=AB=E3=83=89=E3=81=AE?= =?UTF-8?q?=E3=82=B5=E3=83=9D=E3=83=BC=E3=83=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/linux_deploy.yml | 42 ++++++++++++++++++++++++++++++ pubspec.lock | 6 ++--- pubspec.yaml | 1 + 3 files changed, 46 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/linux_deploy.yml diff --git a/.github/workflows/linux_deploy.yml b/.github/workflows/linux_deploy.yml new file mode 100644 index 000000000..715e87ec6 --- /dev/null +++ b/.github/workflows/linux_deploy.yml @@ -0,0 +1,42 @@ +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' + + - name: Install Flutter Build Tools for Linux + run: sudo apt install -y libsecret-1-dev imagemagick + + - 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: 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 \ No newline at end of file diff --git a/pubspec.lock b/pubspec.lock index ea06305be..d77b81535 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -452,13 +452,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: diff --git a/pubspec.yaml b/pubspec.yaml index f59f58d9f..2e104b38e 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -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 dependency_overrides: image_editor: From d44cc65bf2ec453f3ba8a358f3f1966eab9127d4 Mon Sep 17 00:00:00 2001 From: NPL <66727014+Npepperlinux@users.noreply.github.com> Date: Tue, 26 Sep 2023 01:19:33 +0900 Subject: [PATCH 2/4] =?UTF-8?q?artifact=E3=81=AE=E3=82=A2=E3=83=83?= =?UTF-8?q?=E3=83=97=E3=83=AD=E3=83=BC=E3=83=89=E5=85=88=E3=81=AE=E5=A4=89?= =?UTF-8?q?=E6=9B=B4=E3=81=A8Cache=E3=81=AE=E8=A8=AD=E5=AE=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/linux_deploy.yml | 30 ++++++++++++++++++++++++------ 1 file changed, 24 insertions(+), 6 deletions(-) diff --git a/.github/workflows/linux_deploy.yml b/.github/workflows/linux_deploy.yml index 715e87ec6..0ec4111aa 100644 --- a/.github/workflows/linux_deploy.yml +++ b/.github/workflows/linux_deploy.yml @@ -17,9 +17,22 @@ jobs: 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 imagemagick + run: sudo apt install -y libsecret-1-dev - name: Flutter pub get run: flutter pub get @@ -35,8 +48,13 @@ jobs: 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 \ No newline at end of file + # - 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 \ No newline at end of file From eaafd67e11352044e64d8a69f3e6c8d0f0109af7 Mon Sep 17 00:00:00 2001 From: NPL <66727014+Npepperlinux@users.noreply.github.com> Date: Thu, 28 Sep 2023 00:27:32 +0900 Subject: [PATCH 3/4] =?UTF-8?q?=E5=9C=A7=E7=B8=AE=E5=87=A6=E7=90=86?= =?UTF-8?q?=E3=81=AE=E4=BF=AE=E6=AD=A3=E3=81=A8=E3=82=A2=E3=83=83=E3=83=97?= =?UTF-8?q?=E3=83=AD=E3=83=BC=E3=83=89=E6=B8=88=E3=81=BF=E6=88=90=E6=9E=9C?= =?UTF-8?q?=E7=89=A9=E3=81=AE=E5=89=8A=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/linux_deploy.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/linux_deploy.yml b/.github/workflows/linux_deploy.yml index 0ec4111aa..20a037312 100644 --- a/.github/workflows/linux_deploy.yml +++ b/.github/workflows/linux_deploy.yml @@ -46,7 +46,7 @@ jobs: - name: Compress App run: | cd build/linux/x64/release/bundle - tar -czaf miria-$VERSION-x86_64.tar.gz + tar -czaf miria-$VERSION-x86_64.tar.gz * # - name: Upload artifact # uses: actions/upload-artifacts@v3 @@ -57,4 +57,7 @@ jobs: - 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 \ No newline at end of file + 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 From 9d946b934a0d47d93ae5ad13ea36f5519264f7af Mon Sep 17 00:00:00 2001 From: Npepperlinux Date: Wed, 18 Oct 2023 23:40:37 +0900 Subject: [PATCH 4/4] =?UTF-8?q?AppImage=E3=83=93=E3=83=AB=E3=83=89?= =?UTF-8?q?=E3=81=AE=E3=82=B5=E3=83=9D=E3=83=BC=E3=83=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/linux_deploy.yml | 18 ++++++++++++++++++ linux/packaging/appimage/make_config.yaml | 12 ++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 linux/packaging/appimage/make_config.yaml diff --git a/.github/workflows/linux_deploy.yml b/.github/workflows/linux_deploy.yml index 20a037312..ecb504c15 100644 --- a/.github/workflows/linux_deploy.yml +++ b/.github/workflows/linux_deploy.yml @@ -43,6 +43,24 @@ jobs: - 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 diff --git a/linux/packaging/appimage/make_config.yaml b/linux/packaging/appimage/make_config.yaml new file mode 100644 index 000000000..bfdefb6be --- /dev/null +++ b/linux/packaging/appimage/make_config.yaml @@ -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 \ No newline at end of file