From ce9d848388bcd74c54e87b3ff5af5e2f7a6e71ed Mon Sep 17 00:00:00 2001 From: adversary16 <74514367+adversary16@users.noreply.github.com> Date: Thu, 21 Mar 2024 17:49:48 +0300 Subject: [PATCH] Added flatpak autobuild (#19) --- .github/workflows/build-win64.yml | 2 +- .github/workflows/build.yml | 32 +++++++++++++++++++++++-------- .gitignore | 2 +- build-flatpack.sh | 2 +- 4 files changed, 27 insertions(+), 11 deletions(-) diff --git a/.github/workflows/build-win64.yml b/.github/workflows/build-win64.yml index 3083e304..0248b399 100644 --- a/.github/workflows/build-win64.yml +++ b/.github/workflows/build-win64.yml @@ -35,4 +35,4 @@ jobs: file: windows-installer/dino-installer.exe asset_name: dino-installer.exe tag: ${{ github.ref }} - release_name: Dino ${{ steps.ghd.outputs.describe }} + release_name: Dino ${{ steps.ghd.outputs.describe }} \ No newline at end of file diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9d352520..a5f5a5b7 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -31,11 +31,27 @@ jobs: image: bilelmoussaoui/flatpak-github-actions:gnome-44 options: --privileged steps: - - uses: actions/checkout@v2 - with: - fetch-depth: 0 - submodules: true - - uses: flatpak/flatpak-github-actions/flatpak-builder@v6.1 - with: - manifest-path: im.dino.Dino.json - build-bundle: false + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + submodules: true + - run: flatpak repair --user + - uses: flatpak/flatpak-github-actions/flatpak-builder@v6.1 + with: + manifest-path: im.dino.Dino.json + build-bundle: true + - name: Git describe + if: ${{ github.ref_type == 'tag' }} + id: ghd + uses: proudust/gh-describe@v2 + with: + default: '' + - name: Release Dino installer + if: ${{ github.ref_type == 'tag' }} + uses: svenstaro/upload-release-action@2.9.0 + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} + file: app.flatpak + asset_name: app.flatpak + tag: ${{ github.ref }} + release_name: Dino ${{ steps.ghd.outputs.describe }} \ No newline at end of file diff --git a/.gitignore b/.gitignore index d83c868d..a7611a38 100644 --- a/.gitignore +++ b/.gitignore @@ -11,4 +11,4 @@ windows-installer/win64-dist/ *.dll *.flatpak flatpak-dist -.flatpak-builder +.flatpak-builder \ No newline at end of file diff --git a/build-flatpack.sh b/build-flatpack.sh index c0980ecb..01b4e615 100755 --- a/build-flatpack.sh +++ b/build-flatpack.sh @@ -45,7 +45,7 @@ build() { msg "Build commencing!" rm -rf $BUILD_TEMP_DIR - flatpak-builder $BUILD_TEMP_DIR "${APP_NAME}.json" + flatpak-builder --install-deps-from=flathub $BUILD_TEMP_DIR "${APP_NAME}.json" flatpak build-export $BUILD_EXPORT_DIR $BUILD_TEMP_DIR flatpak build-bundle $BUILD_EXPORT_DIR $DIST_NAME $APP_NAME msg "Flatpack bundle ready and saved to ${DIST_NAME}"