Skip to content

Commit a93399c

Browse files
Add multi-arch Flatpak CI builds with ARM64 support
1 parent e018b17 commit a93399c

File tree

1 file changed

+72
-0
lines changed

1 file changed

+72
-0
lines changed

.github/workflows/ci.yml

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
name: spot-flatpak-multiarch
2+
3+
on:
4+
push:
5+
branches: [master, development]
6+
paths-ignore:
7+
- '*.md'
8+
pull_request:
9+
branches: [master, development]
10+
workflow_dispatch:
11+
12+
jobs:
13+
flatpak:
14+
name: "Flatpak ${{ matrix.variant.arch }}"
15+
container:
16+
image: ghcr.io/flathub-infra/flatpak-github-actions:gnome-47
17+
options: --privileged
18+
strategy:
19+
matrix:
20+
variant:
21+
- arch: x86_64
22+
runner: ubuntu-24.04
23+
- arch: aarch64
24+
runner: ubuntu-24.04-arm
25+
runs-on: ${{ matrix.variant.runner }}
26+
steps:
27+
- uses: actions/checkout@v4
28+
- uses: flatpak/flatpak-github-actions/flatpak-builder@v6
29+
with:
30+
bundle: spot-${{ matrix.variant.arch }}.flatpak
31+
manifest-path: dev.alextren.Spot.snapshots.json
32+
cache-key: flatpak-builder-${{ matrix.variant.arch }}-${{ github.sha }}
33+
arch: ${{ matrix.variant.arch }}
34+
35+
release:
36+
name: "Create Release"
37+
needs: [flatpak]
38+
runs-on: ubuntu-latest
39+
if: github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/development')
40+
permissions: write-all
41+
steps:
42+
- uses: actions/checkout@v4
43+
44+
- name: Download all artifacts
45+
uses: actions/download-artifact@v4
46+
with:
47+
path: artifacts
48+
49+
- name: Prepare release files
50+
run: |
51+
mkdir -p release-files
52+
find artifacts -type f -name "*.flatpak" | while read file; do
53+
cp "$file" release-files/
54+
done
55+
ls -la release-files/
56+
57+
- name: Create Release
58+
uses: softprops/action-gh-release@v2
59+
with:
60+
tag_name: "${{ github.ref == 'refs/heads/master' && 'latest' || 'development' }}-${{ github.run_number }}"
61+
name: "Spot ${{ github.ref == 'refs/heads/master' && 'Release' || 'Development' }} Build #${{ github.run_number }}"
62+
body: |
63+
Automated build from ${{ github.ref_name }} branch
64+
65+
## Downloads
66+
- `spot-x86_64.flatpak` - x86_64 build
67+
- `spot-aarch64.flatpak` - ARM64 build (postmarketOS, PinePhone, etc.)
68+
generate_release_notes: true
69+
files: release-files/*.flatpak
70+
make_latest: ${{ github.ref == 'refs/heads/master' }}
71+
prerelease: ${{ github.ref == 'refs/heads/development' }}
72+
token: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)