Added flatpak autobuild (#19)

This commit is contained in:
adversary16 2024-03-21 17:49:48 +03:00 committed by Maxim Logaev
parent aaa7c8ee75
commit ce9d848388
4 changed files with 27 additions and 11 deletions

View file

@ -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 }}

View file

@ -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 }}

2
.gitignore vendored
View file

@ -11,4 +11,4 @@ windows-installer/win64-dist/
*.dll
*.flatpak
flatpak-dist
.flatpak-builder
.flatpak-builder

View file

@ -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}"