Horizon Zero Dawn: add more ids (#90) #331
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: Checkout mxml | |
uses: actions/checkout@v3 | |
with: | |
repository: michaelrsweet/mxml | |
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/misc | |
current=$(date '+%Y-%m-%d %H:%M:%S %A (%Z %z)') | |
msg="Patch database version: $current" | |
msg_md="Patch archive built on: \`$current\`" | |
echo $msg > output/xml/build.txt | |
echo $msg > output/misc/patch_ver.txt | |
echo $msg > build.txt | |
echo $msg_md > patch_built.md | |
echo $msg | |
python .ci/file-autogen-xml.py "$(pwd)/patches/xml/*.xml" "$current" | |
mv output patch1 | |
- name: Verify XML files | |
working-directory: mxml | |
run: | | |
clang ../.ci/test.c -lmxml -D__PC__ | |
FILES="../patches/xml/*.xml" | |
i=0 | |
for f in $FILES | |
do | |
./a.out $f | |
((i=i+1)) | |
done | |
echo "Passed $i files" | |
- name: Verify Generated XML files | |
working-directory: mxml | |
run: | | |
FILES="../patch1/xml/*.xml" | |
i=0 | |
for f in $FILES | |
do | |
./a.out $f | |
((i=i+1)) | |
done | |
echo "Passed $i files" | |
- name: Pack zip | |
run: | | |
mkdir out | |
mv patch1 out/patches | |
cd out | |
chmod -R 0777 patches | |
zip -r ../patch1.zip patches/* | |
cd .. | |
mkdir patch1_artifact | |
mv out/patches patch1_artifact/patches | |
cp patch1.zip build.txt .github/README.md patch_built.md out/ | |
- name: Upload artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: patch1 | |
path: patch1_artifact | |
- name: Upload artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: patches | |
path: patches | |
- name: Deploy | |
if: | | |
github.ref_name == 'main' && | |
github.event_name == 'push' && | |
github.repository == 'GoldHEN/GoldHEN_Patch_Repository' | |
run: | | |
cd out | |
git init | |
git add -A | |
git config --local user.email "action@github.com" | |
git config --local user.name "GitHub Actions" | |
git commit -m 'Deploy patch asset' | |
- name: Force push to destination branch | |
if: | | |
github.ref_name == 'main' && | |
github.event_name == 'push' && | |
github.repository == 'GoldHEN/GoldHEN_Patch_Repository' | |
uses: ad-m/github-push-action@master | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
branch: gh-pages | |
force: true | |
directory: out | |
- name: Checkout website | |
if: | | |
github.ref_name == 'main' && | |
github.event_name == 'push' && | |
github.repository == 'GoldHEN/GoldHEN_Patch_Repository' | |
uses: actions/checkout@v3 | |
with: | |
repository: illusion0001/illusion0001.github.io | |
- name: Run Website Workflow dispatch | |
if: | | |
github.ref_name == 'main' && | |
github.event_name == 'push' && | |
github.repository == 'GoldHEN/GoldHEN_Patch_Repository' | |
env: | |
GITHUB_TOKEN: ${{ secrets.WORKFLOW_RUNNER }} | |
run: gh workflow run jekyll.yml |