mirror of
https://github.com/Royce551/FRESHMusicPlayer.git
synced 2025-01-22 10:51:52 -05:00
54 lines
1.9 KiB
YAML
54 lines
1.9 KiB
YAML
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
workflow_dispatch:
|
|
inputs:
|
|
blueprint:
|
|
description: 'Is Blueprint build? (true/false)'
|
|
required: true
|
|
default: false
|
|
release:
|
|
types: [published]
|
|
|
|
name: Linux CI (Flatpak)
|
|
jobs:
|
|
flatpak-builder:
|
|
name: "Flatpak Builder"
|
|
runs-on: ubuntu-latest
|
|
container:
|
|
image: bilelmoussaoui/flatpak-github-actions:kde-5.15
|
|
options: --privileged
|
|
steps:
|
|
- shell: bash
|
|
id: checkbp
|
|
run: |
|
|
echo "::set-output name=is-blueprint::${{ (github.event_name == 'push') || (github.event_name == 'workflow_dispatch' && github.event.inputs.blueprint) || (github.event_name == 'release' && false) }}"
|
|
- shell: bash
|
|
id: setvars
|
|
env:
|
|
BLUEPRINT: ${{ steps.checkbp.outputs.is-blueprint }}
|
|
run: |
|
|
if [ $BLUEPRINT == 'true' ]; then
|
|
echo "::set-output name=manifest-path::Distribution/io.github.royce551.FRESHMusicPlayer.Blueprint.yml"
|
|
echo "::set-output name=repo-name::partner-blueprint"
|
|
else
|
|
echo "::set-output name=manifest-path::Distribution/io.github.royce551.FRESHMusicPlayer.yml"
|
|
echo "::set-output name=repo-name::partner"
|
|
fi
|
|
- uses: actions/checkout@v2
|
|
- uses: bilelmoussaoui/flatpak-github-actions@v2
|
|
with:
|
|
bundle: "fmp.flatpak"
|
|
manifest-path: ${{ steps.setvars.outputs.manifest-path }}
|
|
- shell: bash
|
|
env:
|
|
REPO_TOKEN: ${{ secrets.FLATPAK_REPO_TOKEN }}
|
|
REPO_LOCATION: https://flatpak.vicr123.com
|
|
REPO_NAME: ${{ steps.setvars.outputs.repo-name }}
|
|
run: |
|
|
sudo dnf install -y python3-aiohttp python3-tenacity python3-gobject
|
|
curl https://github.com/flatpak/flat-manager/releases/download/0.3.7/flat-manager-client -L > flat-manager-client
|
|
chmod +x flat-manager-client
|
|
./flat-manager-client push --commit --publish $(./flat-manager-client create $REPO_LOCATION $REPO_NAME) repo
|
|
|