Skip to content

Commit

Permalink
Build an aarch64 Flatpak bundle
Browse files Browse the repository at this point in the history
  • Loading branch information
danirod committed Jul 6, 2024
1 parent 1865a29 commit d03e566
Showing 1 changed file with 65 additions and 50 deletions.
115 changes: 65 additions & 50 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,67 +14,82 @@
# along with this program. If not, see <https://www.gnu.org/licenses/>.
#
# SPDX-License-Identifier: GPL-3.0-or-later

on:
push:
branches:
- trunk
name: CI for Cartero
pull_request:
branches:
- trunk
name: Build
jobs:

Flatpak:
# needs: CreateRelease
name: "Flatpak Builder"
flatpak:
runs-on: ubuntu-latest
container:
image: bilelmoussaoui/flatpak-github-actions:gnome-45
image: bilelmoussaoui/flatpak-github-actions:gnome-46
options: --privileged
strategy:
matrix:
arch: [x86_64, aarch64]
fail-fast: false
name: "Flatpak (${{ matrix.arch }})"
steps:
- uses: actions/checkout@v4

- name: (ARM) Install Docker
if: ${{ matrix.arch != 'x86_64' }}
run: |
dnf -y install docker
- name: (ARM) Set up QEMU
if: ${{ matrix.arch != 'x86_64' }}
id: qemu
uses: docker/setup-qemu-action@v2
with:
platforms: arm64
- uses: flatpak/flatpak-github-actions/flatpak-builder@v6
with:
bundle: es.danirod.Cartero.flatpak
manifest-path: build-aux/es.danirod.Cartero.json
bundle: es.danirod.Cartero.Devel.flatpak
manifest-path: build-aux/es.danirod.Cartero.Devel.json
cache-key: flatpak-builder-${{ github.sha }}
build-bundle: true
Deliver:

name: "Deliver Package"
runs-on: ubuntu-latest
needs: [Flatpak]
permissions : write-all
steps:
- uses: actions/checkout@v2
- uses: actions/download-artifact@v2
with:
name: es.danirod.Cartero-x86_64
path: .
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Generate Changelog
id: changes
uses: heinrichreimer/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: release-${{ github.sha }}-${{ github.run_number }}
release_name: Release ${{ github.sha }}
body: |
Changes ${{ steps.changes.outputs.changelog }}
draft: false
prerelease: false
- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./es.danirod.Cartero.flatpak
asset_name: es.danirod.Cartero.flatpak
asset_content_type: application/octet-stream
arch: ${{ matrix.arch }}
# Deliver:
# name: "Deliver Package"
# runs-on: ubuntu-latest
# needs: [Flatpak]
# permissions : write-all
# steps:
# - uses: actions/checkout@v2
# - uses: actions/download-artifact@v2
# with:
# name: es.danirod.Cartero-x86_64
# path: .
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# - name: Generate Changelog
# id: changes
# uses: heinrichreimer/[email protected]
# with:
# token: ${{ secrets.GITHUB_TOKEN }}
# - name: Create Release
# id: create_release
# uses: actions/create-release@v1
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# tag_name: release-${{ github.sha }}-${{ github.run_number }}
# release_name: Release ${{ github.sha }}
# body: |
# Changes ${{ steps.changes.outputs.changelog }}
# draft: false
# prerelease: false
# - name: Upload Release Asset
# id: upload-release-asset
# uses: actions/upload-release-asset@v1
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# upload_url: ${{ steps.create_release.outputs.upload_url }}
# asset_path: ./es.danirod.Cartero.flatpak
# asset_name: es.danirod.Cartero.flatpak
# asset_content_type: application/octet-stream

0 comments on commit d03e566

Please sign in to comment.