mirror of
https://github.com/RetroDECK/RetroDECK.git
synced 2024-11-22 22:15:39 +00:00
Merge branch 'buildstream' into cooker + edits
This commit is contained in:
commit
ff7e65f9d3
20
.github/workflows/cooker-selfhosted.yml
vendored
20
.github/workflows/cooker-selfhosted.yml
vendored
|
@ -32,7 +32,7 @@ jobs:
|
||||||
|
|
||||||
- name: Generate build ID
|
- name: Generate build ID
|
||||||
id: generating_buildid
|
id: generating_buildid
|
||||||
run: echo "##[set-output name=build-id;]$(echo "${{ steps.extract_branch.outputs.branch }}-${{ steps.date.outputs.date }}")"
|
run: echo "##[set-output name=build-id;]$(echo "$( git rev-parse --short HEAD )")"
|
||||||
|
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
@ -55,19 +55,21 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
flatpak-builder --user --force-clean --install-deps-from=flathub --install-deps-from=flathub-beta --repo=${GITHUB_WORKSPACE}/local ${GITHUB_WORKSPACE}/retrodeck-flatpak-cooker net.retrodeck.retrodeck.yml
|
flatpak-builder --user --force-clean --install-deps-from=flathub --install-deps-from=flathub-beta --repo=${GITHUB_WORKSPACE}/local ${GITHUB_WORKSPACE}/retrodeck-flatpak-cooker net.retrodeck.retrodeck.yml
|
||||||
|
|
||||||
|
- name: Create Artifact for flathub
|
||||||
|
run: |
|
||||||
|
tar -czf ${GITHUB_WORKSPACE}/RetroDECK-Artifact.tar.gz -C ${GITHUB_WORKSPACE}/retrodeck-flatpak-cooker .
|
||||||
|
hash=($(sha256sum ${GITHUB_WORKSPACE}/RetroDECK-Artifact.tar.gz))
|
||||||
|
echo $hash > ${GITHUB_WORKSPACE}/RetroDECK-Artifact.sha
|
||||||
|
mv -f RetroDECK-Artifact.* ${{ secrets.ARTIFACT_REPO }}
|
||||||
|
continue-on-error: true
|
||||||
|
|
||||||
- name: Create Bundle
|
- name: Create Bundle
|
||||||
run: |
|
run: |
|
||||||
flatpak-builder --user --force-clean --repo=${GITHUB_WORKSPACE}/local ${GITHUB_WORKSPACE}/retrodeck-flatpak-cooker net.retrodeck.retrodeck.yml
|
flatpak build-bundle ${GITHUB_WORKSPACE}/local RetroDECK.flatpak net.retrodeck.retrodeck
|
||||||
flatpak build-bundle $GITHUB_WORKSPACE/local RetroDECK.flatpak net.retrodeck.retrodeck
|
|
||||||
|
|
||||||
- name: Read version from version file
|
|
||||||
id: version
|
|
||||||
run: echo "##[set-output name=version;]$(cat $(find . -name version))"
|
|
||||||
|
|
||||||
- name: Publish the flatpak in a new cooker release
|
- name: Publish the flatpak in a new cooker release
|
||||||
uses: ncipollo/release-action@v1
|
uses: ncipollo/release-action@v1
|
||||||
with:
|
with:
|
||||||
#tag: "${{ steps.version.outputs.version }}"
|
|
||||||
tag: "${{ steps.generating_buildid.outputs.build-id }}"
|
tag: "${{ steps.generating_buildid.outputs.build-id }}"
|
||||||
body: |
|
body: |
|
||||||
# Release Notes (Cooker)
|
# Release Notes (Cooker)
|
||||||
|
@ -76,7 +78,7 @@ jobs:
|
||||||
Cooker channel is provided for the community to test fixes and explore new functionality.
|
Cooker channel is provided for the community to test fixes and explore new functionality.
|
||||||
Please DO NOT open issues or ask support on this build.
|
Please DO NOT open issues or ask support on this build.
|
||||||
|
|
||||||
artifacts: "RetroDECK.flatpak"
|
artifacts: "RetroDECK.flatpak,RetroDECK-Artifact.tar.gz"
|
||||||
allowUpdates: true
|
allowUpdates: true
|
||||||
prerelease: true
|
prerelease: true
|
||||||
draft: false
|
draft: false
|
||||||
|
|
73
.github/workflows/flathub_push_cooker.yml
vendored
73
.github/workflows/flathub_push_cooker.yml
vendored
|
@ -2,13 +2,6 @@
|
||||||
name: PUSH-cooker-flathub
|
name: PUSH-cooker-flathub
|
||||||
|
|
||||||
on:
|
on:
|
||||||
# push:
|
|
||||||
# branches:
|
|
||||||
# - cooker*
|
|
||||||
# pull_request:
|
|
||||||
# branches:
|
|
||||||
# - cooker*
|
|
||||||
|
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
@ -19,12 +12,11 @@ jobs:
|
||||||
- name: Pushing
|
- name: Pushing
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
# EDITABLES:
|
|
||||||
rd_branch="cooker"
|
|
||||||
gits_folder="${GITHUB_WORKSPACE}/gits" # without last /
|
|
||||||
|
|
||||||
# NON-EDITABLES
|
# EDITABLES:
|
||||||
branch="$rd_branch-"$(date +%d%m%y.%H%M)
|
rd_branch=${GITHUB_REF_NAME}
|
||||||
|
echo $rd_branch
|
||||||
|
gits_folder="${GITHUB_WORKSPACE}/gits" # without last /
|
||||||
|
|
||||||
mkdir -vp $gits_folder
|
mkdir -vp $gits_folder
|
||||||
cd $gits_folder
|
cd $gits_folder
|
||||||
|
@ -35,6 +27,11 @@ jobs:
|
||||||
cd $gits_folder
|
cd $gits_folder
|
||||||
git clone --recursive https://github.com/XargonWan/RetroDECK RetroDECK
|
git clone --recursive https://github.com/XargonWan/RetroDECK RetroDECK
|
||||||
cd $gits_folder/RetroDECK
|
cd $gits_folder/RetroDECK
|
||||||
|
|
||||||
|
# NON-EDITABLES
|
||||||
|
#relname="$rd_branch-"$(date +%d%m%y.%H%M)
|
||||||
|
relname="cooker-"$(git rev-parse --short HEAD)
|
||||||
|
|
||||||
git checkout $rd_branch
|
git checkout $rd_branch
|
||||||
git submodule init
|
git submodule init
|
||||||
git submodule update
|
git submodule update
|
||||||
|
@ -43,47 +40,49 @@ jobs:
|
||||||
#sync -rav --progress --exclude={'res/screenshots/','shared-modules/','rd-submodules/retroarch','.git/','docs','retrodeck-flatpak/','retrodeck-flatpak-cooker/','.flatpak-builder/'} ~/RetroDECK/ ~/flathub/
|
#sync -rav --progress --exclude={'res/screenshots/','shared-modules/','rd-submodules/retroarch','.git/','docs','retrodeck-flatpak/','retrodeck-flatpak-cooker/','.flatpak-builder/'} ~/RetroDECK/ ~/flathub/
|
||||||
|
|
||||||
cd $gits_folder/flathub
|
cd $gits_folder/flathub
|
||||||
git checkout -b $branch
|
|
||||||
|
git checkout -b $relname
|
||||||
|
|
||||||
git rm -rf *
|
git rm -rf *
|
||||||
git clean -fxd # restroing git index
|
git clean -fxd # restroing git index
|
||||||
|
|
||||||
# Copying only a few files as the others are cloned by git in retrodeck.sh
|
# Copying only a few files as the others are cloned by git in retrodeck.sh
|
||||||
cd $gits_folder/RetroDECK
|
cd $gits_folder/RetroDECK
|
||||||
cp -rf \
|
cp -rf \
|
||||||
'rd-submodules' \
|
|
||||||
'flathub.json' \
|
'flathub.json' \
|
||||||
'LICENSE' \
|
'LICENSE' \
|
||||||
'net.retrodeck.retrodeck.appdata.xml' \
|
'flathub.yml' \
|
||||||
'net.retrodeck.retrodeck.desktop' \
|
|
||||||
'net.retrodeck.retrodeck.yml' \
|
|
||||||
'README.md' \
|
'README.md' \
|
||||||
$gits_folder/flathub/
|
$gits_folder/flathub/
|
||||||
|
|
||||||
cd $gits_folder/flathub
|
cd $gits_folder/flathub
|
||||||
ls -la
|
ls -lah
|
||||||
|
|
||||||
if [ -d .git/modules ]; then
|
# manipulating manifest
|
||||||
rm -rfv .git/modules/*
|
mv flathub.yml net.retrodeck.retrodeck.yml
|
||||||
fi
|
|
||||||
|
|
||||||
# Adding the real submodules, please update this every time a submodule is added
|
# Getting latest release name
|
||||||
|
# version=$(\
|
||||||
|
# curl -sL \
|
||||||
|
# -H "Accept: application/vnd.github+json" \
|
||||||
|
# -H "Authorization: Bearer ${{ secrets.TRIGGER_BUILD_TOKEN }}" \
|
||||||
|
# https://api.github.com/repos/XargonWan/RetroDECK-cooker/releases \
|
||||||
|
# | jq .[0].tag_name \
|
||||||
|
# | tr -d \" \
|
||||||
|
# )
|
||||||
|
|
||||||
if [ -d shared-modules ]; then
|
sha=$(curl -sL https://artifacts.retrodeck.net/artifacts/RetroDECK-Artifact.sha)
|
||||||
git rm -rf --ignore-unmatch shared-modules
|
|
||||||
rm -rfv shared-modules
|
|
||||||
fi
|
|
||||||
git submodule add https://github.com/flathub/shared-modules.git ./shared-modules
|
|
||||||
|
|
||||||
if [ -d rd-submodules/retroarch ]; then
|
sed -i "s#__SHA__#$sha#g" net.retrodeck.retrodeck.yml
|
||||||
git rm -rf --ignore-unmatch rd-submodules/retroarch
|
|
||||||
rm -rfv rd-submodules/retroarch
|
echo -e "Resulting manifest:\n"
|
||||||
fi
|
cat net.retrodeck.retrodeck.yml
|
||||||
git submodule add https://github.com/flathub/org.libretro.RetroArch.git ./rd-submodules/retroarch
|
|
||||||
|
git config --global user.name "${{ secrets.GITNAME }}"
|
||||||
|
git config --global user.email "${{ secrets.GITMAIL }}"
|
||||||
|
|
||||||
# unbinds all submodules
|
|
||||||
git submodule deinit -f .
|
|
||||||
# checkout again
|
|
||||||
git submodule update --init --recursive
|
|
||||||
git add *
|
git add *
|
||||||
git commit -m "Updated flathub/net.retrodeck.retrodeck from RetroDECK/$rd_branch"
|
git commit -m "Updated flathub/net.retrodeck.retrodeck from RetroDECK/$rd_branch"
|
||||||
git push origin $branch
|
|
||||||
|
git remote -v
|
||||||
|
git push --force https://${{ secrets.TRIGGER_BUILD_TOKEN }}@github.com/flathub/net.retrodeck.retrodeck.git $relname
|
45
flathub.yml
Normal file
45
flathub.yml
Normal file
|
@ -0,0 +1,45 @@
|
||||||
|
app-id: net.retrodeck.retrodeck
|
||||||
|
runtime: org.kde.Platform
|
||||||
|
runtime-version: 5.15-21.08
|
||||||
|
#runtime-version: 6.3 # bumped because of pcsx2-qt
|
||||||
|
sdk: org.kde.Sdk
|
||||||
|
sdk-extensions:
|
||||||
|
- org.freedesktop.Sdk.Extension.llvm14 # Needed for rpcs3
|
||||||
|
- org.freedesktop.Sdk.Extension.dotnet6 # Needed for Ryujinx
|
||||||
|
base: io.qt.qtwebengine.BaseApp # Needed for Yuzu
|
||||||
|
base-version: 5.15-21.08 # Needed for Yuzu
|
||||||
|
command: retrodeck.sh
|
||||||
|
|
||||||
|
finish-args:
|
||||||
|
- --socket=x11
|
||||||
|
- --socket=wayland
|
||||||
|
- --socket=pulseaudio
|
||||||
|
- --share=ipc
|
||||||
|
- --share=network
|
||||||
|
- --device=all
|
||||||
|
- --filesystem=~/retrodeck:create
|
||||||
|
- --filesystem=/run/media
|
||||||
|
- --filesystem=/media
|
||||||
|
- --allow=multiarch
|
||||||
|
- --talk-name=org.freedesktop.ScreenSaver
|
||||||
|
- --talk-name=org.freedesktop.PowerManagement.Inhibit
|
||||||
|
- --talk-name=org.freedesktop.login1
|
||||||
|
- --filesystem=xdg-run/app/com.discordapp.Discord:create
|
||||||
|
# Yuzu
|
||||||
|
# - --filesystem=home:ro # This may break Yuzu, let's see
|
||||||
|
# - --filesystem=/run/media:ro
|
||||||
|
# Dolphin
|
||||||
|
- --allow=bluetooth
|
||||||
|
#- --env=QT_QPA_PLATFORM=xcb #not sure if this will break something
|
||||||
|
# rpcs3
|
||||||
|
- --socket=fallback-x11
|
||||||
|
|
||||||
|
modules:
|
||||||
|
- name: retrodeck
|
||||||
|
buildsystem: simple
|
||||||
|
build-commands:
|
||||||
|
- cp -rn files/* /app
|
||||||
|
sources:
|
||||||
|
- type: archive
|
||||||
|
url: https://artifacts.retrodeck.net/artifacts/RetroDECK-Artifact.tar.gz
|
||||||
|
sha256: __SHA__
|
|
@ -67,6 +67,7 @@ modules:
|
||||||
# [ ] Update the VERSION variable
|
# [ ] Update the VERSION variable
|
||||||
# [ ] Update the appdata.xml with the version number and notes
|
# [ ] Update the appdata.xml with the version number and notes
|
||||||
# [ ] change branch into main in retrodeck module (last one)
|
# [ ] change branch into main in retrodeck module (last one)
|
||||||
|
# [ ] if header (before modules) was edited, edit it even in flathub.yml
|
||||||
# [ ] change the screenshots link from cooker to main
|
# [ ] change the screenshots link from cooker to main
|
||||||
#
|
#
|
||||||
- name: version-initialization
|
- name: version-initialization
|
||||||
|
@ -78,9 +79,7 @@ modules:
|
||||||
VERSION="0.5.0b-cooker"
|
VERSION="0.5.0b-cooker"
|
||||||
if [[ $VERSION == *"cooker"* ]];
|
if [[ $VERSION == *"cooker"* ]];
|
||||||
then
|
then
|
||||||
# Disabled until I figure it out
|
VERSION="cooker-"$(git rev-parse --short HEAD)
|
||||||
# VERSION=$(git describe --tags | tr - .)
|
|
||||||
VERSION="cooker-"$(date +%d%m%y.%H%M)
|
|
||||||
fi
|
fi
|
||||||
echo $VERSION >> ${FLATPAK_DEST}/retrodeck/version
|
echo $VERSION >> ${FLATPAK_DEST}/retrodeck/version
|
||||||
cat ${FLATPAK_DEST}/retrodeck/version
|
cat ${FLATPAK_DEST}/retrodeck/version
|
||||||
|
|
Loading…
Reference in a new issue