Skip to content
Snippets Groups Projects
.gitlab-ci.yml 1.05 KiB
Newer Older
# SPDX-FileCopyrightText: 2018-2023 Bruce Cowan <bruce@bcowan.me.uk>
Bruce Cowan's avatar
Bruce Cowan committed
#
Bruce Cowan's avatar
Bruce Cowan committed
# SPDX-License-Identifier: GPL-3.0-or-later
Bruce Cowan's avatar
Bruce Cowan committed
flatpak:
  image: alpine:latest
Bruce Cowan's avatar
Bruce Cowan committed
  stage: build
Bruce Cowan's avatar
Bruce Cowan committed
  variables:
    MANIFEST_PATH: "uk.me.bcowan.Rugby.yml"
Bruce Cowan's avatar
Bruce Cowan committed
    RUNTIME_REPO: "https://flathub.org/repo/flathub.flatpakrepo"
Bruce Cowan's avatar
Bruce Cowan committed
    FLATPAK_MODULE: "rugby"
    BUNDLE: "rugby.flatpak"
    APP_ID: "uk.me.bcowan.Rugby"
Bruce Cowan's avatar
Bruce Cowan committed

Bruce Cowan's avatar
Bruce Cowan committed
  script:
  - apk update && apk add flatpak-builder
Bruce Cowan's avatar
Bruce Cowan committed
  - flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
Bruce Cowan's avatar
Bruce Cowan committed
  - flatpak install -y flathub org.gnome.Platform 44
  - flatpak install -y flathub org.gnome.Sdk 44
Bruce Cowan's avatar
Bruce Cowan committed
  - flatpak-builder --stop-at=${FLATPAK_MODULE} app ${MANIFEST_PATH}
  - flatpak build app meson --prefix=/app ${MESON_ARGS} _build
  - flatpak build app ninja -C _build install
  - flatpak-builder --finish-only --repo=repo app ${MANIFEST_PATH}
  - flatpak build-bundle repo ${BUNDLE} --runtime-repo=${RUNTIME_REPO} ${APP_ID}
Bruce Cowan's avatar
Bruce Cowan committed
  artifacts:
    paths:
    - ${BUNDLE}
    - _build/meson-logs/meson-log.txt
  cache:
    paths:
      - .flatpak-builder/cache