Skip to content

typoでタイホー #10

typoでタイホー

typoでタイホー #10

Workflow file for this run

name: Build Flatpak
on: [push]
jobs:
build_flutter_app:
name: Build and compress Flutter App
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Install Flutter dependencies
run: |
sudo apt update
sudo apt install -y clang cmake ninja-build pkg-config libgtk-3-dev liblzma-dev libstdc++-12-dev libsecret-1-dev
- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
channel: 'stable'
- name: Build Flutter Linux version
run: |
flutter pub get
flutter build linux
echo "VERSION=$(flutter pub run cider version)" >> $GITHUB_ENV
- name: Compress App
run: |
tar -czaf miria-$VERSION-amd64.tar.gz ./build/linux/x64/release/bundle/*
echo "TAR_SHA=$(sha256sum miria-$VERSION-amd64.tar.gz | grep -f 1)" >> $GITHUB_ENV
- name: Upload artifact
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: gh release upload v$VERSION miria-$VERSION-amd64.tar.gz
build_flatpak:
name: Build Flatpak
needs: build_flutter_app
runs-on: ubuntu-latest
container:
image: bilelmoussaoui/flatpak-github-actions:freedesktop-22.08
options: --privileged
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Setup build env
run: |
cp assets/images/icon.png assets/images/info.shiosyakeyakini.miria.png
sed -i "s|url: file_path|url: https://github.com/Npepperlinux/miria/releases/download/v$VERSION/miria-$VERSION-amd64.tar.gz|g" flatpak/info.shiosyakeyakini.miria.yml
sed -i "s|sha256: get-later|sha256: $TAR_SHA|g" flatpak/info.shiosyakeyakini.miria.yml
sed -i "s|ReplaceToCommand|tar -xf miria-$VERSION-amd64.tar.gz -C miria|g"
- name: Build .flatpak
uses: flatpak/flatpak-github-actions/flatpak-builder@v6
with:
bundle: miria.flatpak
manifest-path: flatpak/info.shiosyakeyakini.miria.yml
- name: Upload Flatpak artifact
uses: actions/upload-artifact@v3
with:
path: miria.flatpak