mirror of
https://github.com/arabianq/pipewire-soundpad.git
synced 2026-04-28 06:21:23 +00:00
add Flatpak CI and release workflows, update paths in manifest
This commit is contained in:
@@ -0,0 +1,72 @@
|
||||
name: Release Flatpak
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
on:
|
||||
release:
|
||||
types: [created]
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
tag:
|
||||
description: "Tag to attach assets to (e.g. v1.0.0)"
|
||||
required: false
|
||||
|
||||
jobs:
|
||||
flatpak-release:
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: bilelmoussaoui/flatpak-github-actions:freedesktop-24.08
|
||||
options: --privileged
|
||||
|
||||
steps:
|
||||
- name: Determine tag to use
|
||||
id: tag
|
||||
run: |
|
||||
set -euo pipefail
|
||||
|
||||
INPUT_TAG="${{ github.event.inputs.tag || '' }}"
|
||||
if [ -n "$INPUT_TAG" ]; then
|
||||
echo "tag=$INPUT_TAG" >> $GITHUB_OUTPUT
|
||||
exit 0
|
||||
fi
|
||||
|
||||
EVENT_TAG="${{ github.event.release.tag_name || '' }}"
|
||||
if [ -n "$EVENT_TAG" ]; then
|
||||
echo "tag=$EVENT_TAG" >> $GITHUB_OUTPUT
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [[ "${GITHUB_REF:-}" =~ ^refs/tags/(.+)$ ]]; then
|
||||
echo "tag=${BASH_REMATCH[1]}" >> $GITHUB_OUTPUT
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo "No tag found"
|
||||
echo "tag=" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Fail if no tag determined
|
||||
if: ${{ steps.tag.outputs.tag == '' }}
|
||||
run: |
|
||||
echo "ERROR: No tag determined."
|
||||
exit 1
|
||||
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
ref: ${{ steps.tag.outputs.tag }}
|
||||
submodules: recursive
|
||||
|
||||
- name: Build Flatpak
|
||||
uses: flatpak/flatpak-github-actions/flatpak-builder@v6
|
||||
with:
|
||||
bundle: ru.arabianq.pwsp.flatpak
|
||||
manifest-path: packages/flatpak/ru.arabianq.pwsp.yaml
|
||||
cache: true
|
||||
branch: master
|
||||
|
||||
- name: Upload Flatpak to release
|
||||
uses: softprops/action-gh-release@v2
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
tag_name: ${{ steps.tag.outputs.tag }}
|
||||
files: ru.arabianq.pwsp.flatpak
|
||||
Reference in New Issue
Block a user