mirror of
https://github.com/f4exb/sdrangel.git
synced 2026-05-23 16:46:55 -04:00
Add GitHub Actions workflow to build and publish Flatpak bundle
Agent-Logs-Url: https://github.com/f4exb/sdrangel/sessions/862cd268-1d4c-402d-b530-b2885bf6d153 Co-authored-by: srcejon <57259258+srcejon@users.noreply.github.com>
This commit is contained in:
parent
6446d7c1b2
commit
e6a50381e9
49
.github/workflows/flatpak.yml
vendored
Normal file
49
.github/workflows/flatpak.yml
vendored
Normal file
@ -0,0 +1,49 @@
|
||||
name: SDRangel Flatpak build
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- flatpak
|
||||
tags:
|
||||
- 'v*'
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build_flatpak:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: true
|
||||
fetch-depth: 0
|
||||
- name: Get version
|
||||
id: get_version
|
||||
run: |
|
||||
if [[ "${{ github.ref_name }}" == "flatpak" ]]; then
|
||||
echo "version=${{ github.sha }}" >> "$GITHUB_OUTPUT"
|
||||
else
|
||||
echo "version=$(echo "${{ github.ref_name }}" | cut -c2-)" >> "$GITHUB_OUTPUT"
|
||||
fi
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y flatpak flatpak-builder
|
||||
- name: Add Flathub remote
|
||||
run: |
|
||||
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
|
||||
- name: Build Flatpak
|
||||
uses: flatpak/flatpak-github-actions/flatpak-builder@v6
|
||||
with:
|
||||
bundle: sdrangel-${{ steps.get_version.outputs.version }}-x86_64.flatpak
|
||||
manifest-path: flatpak/org.sdrangel.SDRangel.yaml
|
||||
cache-key: flatpak-builder-${{ github.sha }}
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: sdrangel-${{ steps.get_version.outputs.version }}-x86_64.flatpak
|
||||
path: sdrangel-${{ steps.get_version.outputs.version }}-x86_64.flatpak
|
||||
- name: Upload release
|
||||
if: startsWith(github.ref, 'refs/tags/')
|
||||
uses: softprops/action-gh-release@v2
|
||||
with:
|
||||
files: sdrangel-${{ steps.get_version.outputs.version }}-x86_64.flatpak
|
||||
Loading…
x
Reference in New Issue
Block a user