Skip to content

v1.0.15-next.2024.01.21+96 #96

v1.0.15-next.2024.01.21+96

v1.0.15-next.2024.01.21+96 #96

Workflow file for this run

name: デプロイ(Linux)
on:
workflow_dispatch:
release:
types: [published]
permissions:
contents: write
jobs:
build_for_linux:
name: Linux用ビルド
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install Flutter Develop dependencies
run: sudo apt install -y clang cmake ninja-build pkg-config libgtk-3-dev liblzma-dev libstdc++-12-dev libmpv-dev mpv
- 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