CI/Linux: Push to Flathub beta

This commit is contained in:
Stenzek 2023-06-26 21:51:20 +10:00 committed by Connor McLaughlin
parent d51d51b3cc
commit 19cf29e5cf
2 changed files with 25 additions and 3 deletions

View File

@ -84,7 +84,7 @@ jobs:
build-bundle: true build-bundle: true
verbose: true verbose: true
mirror-screenshots-url: https://dl.flathub.org/repo/screenshots mirror-screenshots-url: https://dl.flathub.org/repo/screenshots
branch: stable branch: beta
cache: true cache: true
restore-cache: true restore-cache: true
cache-key: ${{ inputs.os }} ${{ inputs.platform }} ${{ inputs.compiler }} ${{ inputs.detail }} flatpak ${{ hashFiles('.github/workflows/scripts/linux/flatpak/**/*.json') }} cache-key: ${{ inputs.os }} ${{ inputs.platform }} ${{ inputs.compiler }} ${{ inputs.detail }} flatpak ${{ hashFiles('.github/workflows/scripts/linux/flatpak/**/*.json') }}
@ -93,4 +93,10 @@ jobs:
run: | run: |
ostree commit --repo=repo --canonical-permissions --branch=screenshots/x86_64 .github/workflows/scripts/linux/flatpak/screenshots ostree commit --repo=repo --canonical-permissions --branch=screenshots/x86_64 .github/workflows/scripts/linux/flatpak/screenshots
# TODO: Push to flathub - name: Push to Flathub
if: inputs.publish == true
uses: flatpak/flatpak-github-actions/flat-manager@v6.1
with:
flat-manager-url: https://hub.flathub.org/
repository: beta
token: ${{ secrets.FLATHUB_BETA_TOKEN }}

View File

@ -8,12 +8,21 @@ set -e
ARCH=x86_64 ARCH=x86_64
KDE_BRANCH=6.5 KDE_BRANCH=6.5
BRANCH=22.08 BRANCH=22.08
FLAT_MANAGER_CLIENT_DIR="$HOME/.local/bin"
# Build packages. # Build packages. Mostly needed for flat-manager-client.
declare -a BUILD_PACKAGES=( declare -a BUILD_PACKAGES=(
"flatpak" "flatpak"
"flatpak-builder" "flatpak-builder"
"appstream-util" "appstream-util"
"python3-aiohttp"
"python3-tenacity"
"python3-gi"
"gobject-introspection"
"libappstream-glib8"
"libappstream-glib-dev"
"libappstream-dev"
"gir1.2-ostree-1.0"
) )
# Flatpak runtimes and SDKs. # Flatpak runtimes and SDKs.
@ -36,3 +45,10 @@ sudo flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub
echo "Will install the following packages for building - ${FLATPAK_PACKAGES[*]}" echo "Will install the following packages for building - ${FLATPAK_PACKAGES[*]}"
retry_command sudo flatpak -y install "${FLATPAK_PACKAGES[@]}" retry_command sudo flatpak -y install "${FLATPAK_PACKAGES[@]}"
echo "Downloading flat-manager-client"
mkdir -p "$FLAT_MANAGER_CLIENT_DIR"
pushd "$FLAT_MANAGER_CLIENT_DIR"
aria2c -Z "https://raw.githubusercontent.com/flatpak/flat-manager/master/flat-manager-client"
chmod +x flat-manager-client
echo "$FLAT_MANAGER_CLIENT_DIR" >> $GITHUB_PATH
popd