実行できるかテスト #7
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: デプロイ(Linux AppImage) | |
on: [push] | |
permissions: | |
contents: write | |
jobs: | |
build_for_linux: | |
name: Linux AppImageのビルド | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install Flutter | |
uses: subosito/flutter-action@v2 | |
with: | |
channel: 'stable' | |
cache: true | |
- name: Flutter pub get | |
run: flutter pub get | |
- name: Get Version | |
run: echo "BUMP_VERSION=$(flutter pub run cider version)" >> $GITHUB_ENV | |
- name: Setup build env | |
run: | | |
sudo apt install libsecret-1-dev clang cmake ninja-build pkg-config libgtk-3-dev liblzma-dev libstdc++-12-dev imagemagick | |
wget -O appimagetool "https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage" | |
chmod +x appimagetool | |
sudo mv appimagetool /usr/local/bin/ | |
- name: Build for Linux | |
run: flutter build linux | |
- name: Setup AppImage create env | |
run: | | |
cp -r build/linux/x64/release/bundle miria.AppDir | |
convert assets/images/icon.png -resize 256x256 miria.AppDir/miria.png | |
cp miria.AppDir/miria.png miria.AppDir/.DirIcon | |
cp linux/miria.desktop miria.AppDir/ | |
chmod +x miria.AppDir/miria.desktop | |
cp linux/AppRun miria.AppDir/ | |
chmod +x miria.AppDir/AppRun | |
- name: Create AppImage | |
run: | | |
appimagetool --appimage-extract | |
./squashfs-root/AppRun miria.AppDir/ | |
mv miria-x86_64.AppImage miria-$BUMP_VERSION-amd64.AppImage | |
- name: Upload AppImage file | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
gh release upload v$BUMP_VERSION miria-$BUMP_VERSION-amd64.AppImage |