Add PS5 GitHub Actions build

This commit is contained in:
Knutwurst committed 2026-06-27 19:19:05 +02:00
1 parent 44ab1dd822
commit 5dc5ee57b3
2 files changed
+154

No files matched your search

+6
View File
@@ -0,0 +1,6 @@
# Files included in the release archive.
# One path per line, relative to the repository root.
patchdl-ps5.elf
README.md
LICENSE
+148
View File
@@ -0,0 +1,148 @@
name: PS5 Build and Release
on:
push:
paths-ignore:
- "**/*.md"
- "docs/**"
- "photos/**"
pull_request:
paths-ignore:
- "**/*.md"
- "docs/**"
- "photos/**"
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }}
cancel-in-progress: false
permissions:
contents: read
jobs:
build:
outputs:
archive_name: ${{ steps.package.outputs.archive_name }}
runs-on: ubuntu-latest
steps:
- name: Checkout PatchDL
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Checkout pacbrew-repo
uses: actions/checkout@v4
with:
repository: ps5-payload-dev/pacbrew-repo
path: pacbrew-repo
- name: Checkout SDK stubs
uses: actions/checkout@v4
with:
repository: ps5-payload-dev/sdk
path: ps5-sdk
- name: Setup build environment
run: |
sudo apt update
sudo apt install -y \
autoconf \
automake \
build-essential \
clang-18 \
cmake \
curl \
git \
libarchive-tools \
libtool \
lld-18 \
makepkg \
meson \
ninja-build \
pacman-package-manager \
pkg-config \
python3 \
zip
- name: Build and install pacbrew packages
shell: bash
run: |
set -euo pipefail
build_and_install() {
local package_dir="$1"
pushd "pacbrew-repo/${package_dir}"
makepkg -c -f
sudo pacman --noconfirm -U ./ps5-payload-*.pkg.tar.gz
popd
}
build_and_install sdk
build_and_install libcxx
build_and_install zlib
build_and_install zstd
build_and_install openssl
build_and_install libpsl
build_and_install curl
- name: Build payload
env:
PS5_PAYLOAD_SDK: /opt/ps5-payload-sdk
PS5_SCE_STUBS_DIR: ${{ github.workspace }}/ps5-sdk/sce_stubs
run: |
scripts/build_ps5.sh clean all
- name: Create release archive
id: package
shell: bash
run: |
set -euo pipefail
version_tag="$(git describe --abbrev=6 --dirty --always --tags 2>/dev/null || echo "${GITHUB_SHA::7}")"
archive_name="PatchDL_${version_tag}.zip"
manifest_file=".github/release-files.txt"
mapfile -t release_files < <(grep -Ev '^[[:space:]]*(#|$)' "${manifest_file}")
if [ "${#release_files[@]}" -eq 0 ]; then
echo "Release manifest is empty: ${manifest_file}" >&2
exit 1
fi
for release_file in "${release_files[@]}"; do
if [ ! -f "${release_file}" ]; then
echo "Missing release file: ${release_file}" >&2
exit 1
fi
done
zip -9 "${archive_name}" "${release_files[@]}"
echo "archive_name=${archive_name}" >> "$GITHUB_OUTPUT"
- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ steps.package.outputs.archive_name }}
path: ${{ steps.package.outputs.archive_name }}
if-no-files-found: error
release:
needs: build
permissions:
contents: write
if: startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
steps:
- name: Download build artifacts
uses: actions/download-artifact@v4
with:
name: ${{ needs.build.outputs.archive_name }}
path: dist
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ github.ref_name }}
generate_release_notes: true
files: dist/${{ needs.build.outputs.archive_name }}