Skip to content

Commit 8529df4

Browse files
authored
Test adding GitHub Actions workflow for Flatpak build and release
1 parent c9a369a commit 8529df4

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Build and Release Flatpak
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
jobs:
9+
build-flatpak:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout code
14+
uses: actions/checkout@v4
15+
16+
- name: Update manifest with current tag
17+
run: |
18+
sed -i "s|tag: main|tag: ${{ github.ref_name }}|g" io.github.rfrench3.scopebuddy-gui.yml
19+
20+
- name: Install Flatpak and Flatpak Builder
21+
run: |
22+
sudo apt-get update
23+
sudo apt-get install -y flatpak flatpak-builder
24+
sudo flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
25+
26+
- name: Install KDE SDK and Base App
27+
run: |
28+
sudo flatpak install -y flathub org.kde.Platform//6.9
29+
sudo flatpak install -y flathub org.kde.Sdk//6.9
30+
sudo flatpak install -y flathub io.qt.PySide.BaseApp//6.9
31+
32+
- name: Build Flatpak
33+
run: |
34+
flatpak-builder --repo=repo --force-clean build-dir io.github.rfrench3.scopebuddy-gui.yml
35+
flatpak build-bundle repo scopebuddy-gui-${{ github.ref_name }}.flatpak io.github.rfrench3.scopebuddy-gui
36+
37+
- name: Upload to Release
38+
uses: softprops/action-gh-release@v1
39+
with:
40+
files: |
41+
scopebuddy-gui-${{ github.ref_name }}.flatpak
42+
draft: false
43+
prerelease: false
44+
env:
45+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)