From f6728dcd933923ef3597b93b6a58793df2ca4dd7 Mon Sep 17 00:00:00 2001 From: Predidit <34627277+Predidit@users.noreply.github.com> Date: Sat, 4 May 2024 12:36:48 +0800 Subject: [PATCH] add CI for linux --- .github/workflows/release.yaml | 38 +++++++++++++++++++++++++++++++++- 1 file changed, 37 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index e0c49c6..8e32d16 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -61,4 +61,40 @@ name: outputs path: | bilineo_windows_*.zip - build/app/outputs/flutter-apk/bilineo_android_*.apk \ No newline at end of file + build/app/outputs/flutter-apk/bilineo_android_*.apk + + flutter-build-linux: + name: "Relase for Linux" + needs: flutter-build + runs-on: "ubuntu-latest" + steps: + - name: Clone repository + uses: actions/checkout@v4 + - run: | + $tag = "${{ github.ref }}".Replace('refs/tags/', '') + echo "tag=$(echo $tag)" >> $env:GITHUB_ENV + - run: echo "bilineo_linux_${env:tag}.tar.gz build progress" + - name: Install dependencies + run: | + sudo apt-get update + sudo apt-get install -y clang cmake libgtk-3-dev ninja-build libayatana-appindicator3-dev mpv + - name: Set up Flutter + uses: subosito/flutter-action@v2 + with: + channel: stable + flutter-version-file: pubspec.yaml + - run: flutter pub get + - run: flutter build linux + - run: tar -zcvf bilineo_linux_${env:tag}.tar.gz build/linux/x64/release/bundle/* + - uses: "marvinpinto/action-automatic-releases@latest" + with: + repo_token: "${{ secrets.GITHUB_TOKEN }}" + prerelease: false + files: | + bilineo_linux_*.tar.gz + - name: Upload outputs + uses: actions/upload-artifact@v4 + with: + name: outputs-linux + path: | + bilineo_linux_*.tar.gz \ No newline at end of file