Skip to content

Elden Ring: Restore Debug Features #428

Elden Ring: Restore Debug Features

Elden Ring: Restore Debug Features #428

Workflow file for this run

name: Pack patch zip
on:
push:
paths-ignore:
- "**/*.md"
- '**/*.txt'
pull_request:
paths-ignore:
- "**/*.md"
- '**/*.txt'
workflow_dispatch:
jobs:
zip-patches:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@main
with:
submodules: recursive
- name: Checkout mxml
uses: actions/checkout@main
with:
repository: bucanero/mxml
ref: f2d6c728b85333a9734bd7eebd4131c65ad11da2
path: mxml
- name: Configure mxml
working-directory: mxml
env:
CC: /usr/bin/gcc
run: ./configure --enable-debug --enable-maintainer
- name: Build mxml
working-directory: mxml
run: |
sudo make
sudo make install
echo LD_LIBRARY_PATH=$(pwd) >> $GITHUB_ENV
- name: Generate TitleID files
run: |
mkdir -p output/xml
mkdir -p output/xml_prospero
mkdir -p output/misc
current=$(date '+%Y-%m-%d %H:%M:%S %A (%Z %z)')
echo "current_time=$(date +%s)" >> ${{ github.env }}
echo "current_date=$current" >> ${{ github.env }}
msg="Patch database version: $current"
msg_md="Patch archive built on: \`$current\`"
echo $msg > output/xml/build.txt
echo $msg > output/xml_prospero/build.txt
echo $msg > output/misc/patch_ver.txt
echo $msg > output/build.txt
echo $msg_md > output/patch_built.md
echo $msg
echo $msg_md
python .ci/file-autogen-xml.py "$(pwd)/patches/xml/*.xml" "$current" "output/xml" > ${{ github.workspace }}/gen_ps4.log
python .ci/file-autogen-xml.py "$(pwd)/patches/xml_prospero/*.xml" "$current" "output/xml_prospero" > ${{ github.workspace }}/gen_ps5.log
mv output patch1
- name: Verify XML files
working-directory: mxml
run: |
clang ../.ci/test.c -lmxml -D__PC__
FILES="../patches/xml/*.xml"
FILES_PS5="../patches/xml_prospero/*.xml"
i=0
for f in $FILES
do
./a.out $f >> ${{ github.workspace }}/verify_ps4.log
((i=i+1))
done
for f in $FILES_PS5
do
./a.out $f >> ${{ github.workspace }}/verify_ps5.log
((i=i+1))
done
echo "Passed $i files"
- name: Verify Generated XML files
working-directory: mxml
run: |
FILES="../patch1/xml/*.xml"
FILES_PS5="../patches/xml_prospero/*.xml"
i=0
for f in $FILES
do
./a.out $f >> ${{ github.workspace }}/verify_ps4.log
((i=i+1))
done
for f in $FILES_PS5
do
./a.out $f >> ${{ github.workspace }}/verify_ps5.log
((i=i+1))
done
echo "Passed $i files"
- name: Pack zip
run: |
mkdir out
mv patch1 out/patches
cd out
zip -r ${{ github.workspace }}/patch1.zip patches/* patches/build.txt patches/misc/patch_ver.txt
mkdir ../patch1_artifact
mv patches ../patch1_artifact/patches
- name: Upload artifact
uses: actions/upload-artifact@main
with:
name: patch1
path: patch1_artifact
- name: Upload artifact logs
if: success() || failure()
uses: actions/upload-artifact@main
with:
name: logs
path: ./*.log
- name: Create Release
if: |
github.ref_name == 'main' &&
github.event_name == 'push' &&
github.repository == 'illusion0001/PS4-PS5-Game-Patch'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
hash_md="hash.md"
echo "# Release date" > $hash_md
echo "- \`${{ env.current_date }}\`" >> $hash_md
echo "## File details" >> $hash_md
echo "" >> $hash_md
echo "<details>" >> $hash_md
echo "<summary>File hashes (Click to Expand)</summary>" >> $hash_md
echo "" >> $hash_md
echo "\`\`\`sha256" >> $hash_md
echo "$(sha256sum ${{ github.workspace }}/patch1.zip)" >> $hash_md
echo "\`\`\`" >> $hash_md
echo "" >> $hash_md
echo "</details>" >> $hash_md
gh release create "${{ env.current_time }}" "${{ github.workspace }}/patch1.zip" --target "${{ GITHUB.SHA }}" -t "${{ env.current_date }}" -F $hash_md
- name: Checkout website
if: |
github.ref_name == 'main' &&
github.event_name == 'push' &&
github.repository == 'illusion0001/PS4-PS5-Game-Patch'
uses: actions/checkout@main
with:
repository: illusion0001/illusion0001.github.io
- name: Run Website Workflow dispatch
if: |
github.ref_name == 'main' &&
github.event_name == 'push' &&
github.repository == 'illusion0001/PS4-PS5-Game-Patch'
env:
GITHUB_TOKEN: ${{ secrets.WORKFLOW_RUNNER }}
run: gh workflow run jekyll.yml