mirror of
https://github.com/isledecomp/isle-portable.git
synced 2026-02-03 12:31:15 +00:00
[flatpak] Added official Flatpak GH Action to release.yml
This commit is contained in:
parent
6431046ca8
commit
7b9addea26
105
.github/workflows/flatpak.yml
vendored
105
.github/workflows/flatpak.yml
vendored
@ -1,105 +0,0 @@
|
||||
name: Build Release Flatpaks
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- flatpak # TODO: Remove this line once the workflow has been validated to work.
|
||||
|
||||
env:
|
||||
APP_ID: pizza.isle.Isle
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: ${{ matrix.name }}
|
||||
runs-on: ${{ matrix.os }}
|
||||
|
||||
env:
|
||||
BUILD_DIR: "./flatpak-build"
|
||||
PLATFORM: "org.kde"
|
||||
PLATFORM_VERSION: 6.8
|
||||
REPO_DIR: "./isle-repo/"
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- name: 'x86_64'
|
||||
os: 'ubuntu-latest'
|
||||
|
||||
# The Ubuntu ARM runner is in preview, so we may have to figure out Flatpak cross-compilation
|
||||
- name: "aarch64"
|
||||
os: 'ubuntu-22.04-arm'
|
||||
|
||||
steps:
|
||||
- name: Get Date
|
||||
id: get-date
|
||||
run: |
|
||||
echo "date=$(/bin/date -u "+%Y%m%d")" >> $GITHUB_OUTPUT
|
||||
shell: bash
|
||||
|
||||
- name: Cache APT repo data
|
||||
id: cache-apt
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: |
|
||||
/var/cache/apt/
|
||||
/var/lib/apt/lists/
|
||||
key: ${{ runner.os }}-${{ matrix.name }}-${{ steps.get-date.outputs.date }}
|
||||
|
||||
- name: Update APT cache
|
||||
if: steps.cache-apt.outputs.cache-hit != 'true'
|
||||
run: sudo apt update
|
||||
|
||||
- name: Install build dependencies
|
||||
run: |
|
||||
sudo apt install -y flatpak flatpak-builder
|
||||
flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo
|
||||
flatpak install \
|
||||
${{ env.PLATFORM }}.Platform//${{ env.PLATFORM_VERSION }} \
|
||||
${{ env.PLATFORM }}.Sdk//${{ env.PLATFORM_VERSION }}
|
||||
|
||||
- name: Cache .flatpak-builder
|
||||
id: cache-fp-builder
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ".flatpak-builder/"
|
||||
key: ${{ runner.os }}-${{ matrix.name }}-fp-builder
|
||||
|
||||
- name: Build Flatpak
|
||||
run: |
|
||||
mkdir ${{ env.REPO_DIR }}
|
||||
flatpak-builder --repo=${{ env.REPO_DIR }} ${{ env.BUILD_DIR }} flatpak/${{ env.APP_ID }}.json
|
||||
|
||||
- name: Bundle Flatpak
|
||||
run: flatpak build-bundle ${{ env.REPO_DIR }} ${{ env.APP_ID }}.${{ matrix.name }}.flatpak ${{ env.APP_ID }}
|
||||
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@main
|
||||
with:
|
||||
name: Release-${{ matrix.name }}
|
||||
path: ${{ env.APP_ID }}.${{ matrix.name }}.flatpak
|
||||
|
||||
release:
|
||||
name: Release
|
||||
runs-on: ubuntu-latest
|
||||
needs: build
|
||||
steps:
|
||||
- name: Download All Artifacts
|
||||
uses: actions/download-artifact@main
|
||||
with:
|
||||
pattern: Release-*
|
||||
path: Release
|
||||
merge-multiple: true
|
||||
|
||||
- name: Checkout uploadtool
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: 'probonopd/uploadtool'
|
||||
path: 'uploadtool'
|
||||
|
||||
- name: Upload Continuous Release
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
./uploadtool/upload.sh Release/*
|
||||
30
.github/workflows/release.yml
vendored
30
.github/workflows/release.yml
vendored
@ -4,6 +4,7 @@ on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- flatpak # TODO: Remove this line once the workflow has been validated to work.
|
||||
|
||||
jobs:
|
||||
build:
|
||||
@ -91,6 +92,35 @@ jobs:
|
||||
path: |
|
||||
build/dist/isle-*
|
||||
|
||||
flatpak:
|
||||
name: "Flatpak (${{ matrix.arch }})"
|
||||
runs-on: ${{ matrix.os }}
|
||||
|
||||
env:
|
||||
APP_ID: pizza.isle.Isle
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- arch: x86_64
|
||||
os: ubuntu-latest
|
||||
|
||||
- arch: aarch64
|
||||
os: ubuntu-22.04-arm
|
||||
|
||||
container:
|
||||
image: ghcr.io/flathub-infra/flatpak-github-actions:kde-6.8
|
||||
options: --privileged
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: flatpak/flatpak-github-actions/flatpak-builder@v6
|
||||
with:
|
||||
bundle: ${{ env.APP_ID }}.${{ matrix.arch }}.flatpak
|
||||
manifest-path: flatpak/${{ env.APP_ID }}.json
|
||||
arch: ${{ matrix.arch }}
|
||||
|
||||
release:
|
||||
name: 'Release'
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
Loading…
Reference in New Issue
Block a user