-
Notifications
You must be signed in to change notification settings - Fork 3
91 lines (77 loc) · 3.28 KB
/
minor_patch_diff.yml
File metadata and controls
91 lines (77 loc) · 3.28 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
name: Minor Patch Diff Workflow
on:
schedule:
- cron: '0 7 * * *' # 11PM PST is 7AM UTC
workflow_dispatch:
jobs:
check-and-diff:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Download Latest ffxiv_dx11.exe
id: downloader-latest
uses: WorkingRobot/ffxiv-downloader@v8
with:
output-path: latest
regex: '^ffxiv_dx11\.exe$'
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: '3.12'
cache: 'pip'
- name: Fetch Patch Info and Update Versions
id: versions
if: steps.downloader-latest.outputs.updated == 'true' || github.event_name == 'workflow_dispatch'
run: python automation/ffxiv_info.py >> $GITHUB_OUTPUT
- name: Download Previous ffxiv_dx11.exe
if: steps.versions.outputs.is_new == 'true'
uses: WorkingRobot/ffxiv-downloader@v8
with:
version: ${{ steps.versions.outputs.date_prev }}
output-path: previous
regex: '^ffxiv_dx11\.exe$'
- name: Install Analysis Tools
if: steps.versions.outputs.is_new == 'true'
run: |
curl -L -o radare2.deb https://github.com/radareorg/radare2/releases/download/6.1.0/radare2_6.1.0_amd64.deb
sudo dpkg -i radare2.deb || sudo apt-get install -f -y
rm radare2.deb
- name: Install Python Dependencies
if: steps.versions.outputs.is_new == 'true'
run: |
pip install -r requirements-vtable.txt
- name: Run Diff
if: steps.versions.outputs.is_new == 'true'
run: |
LATEST_EXE=$(find latest -name "ffxiv_dx11.exe" | head -n 1)
PREVIOUS_EXE=$(find previous -name "ffxiv_dx11.exe" | head -n 1)
cp "$LATEST_EXE" "ffxiv_dx11.${{ steps.versions.outputs.retail_new }}.exe"
cp "$PREVIOUS_EXE" "ffxiv_dx11.${{ steps.versions.outputs.retail_prev }}.exe"
# Run the diffing process and capture JSON output
python vtable_diff.py "ffxiv_dx11.${{ steps.versions.outputs.retail_prev }}.exe" "ffxiv_dx11.${{ steps.versions.outputs.retail_new }}.exe" > "diffs/${{ steps.versions.outputs.retail_new }}.diff.json"
- name: Upload Results
if: steps.versions.outputs.is_new == 'true'
uses: actions/upload-artifact@v6
with:
name: diff
path: |
diffs/${{ steps.versions.outputs.retail_new }}.diff.json
- name: Create Pull Request
if: steps.versions.outputs.is_new == 'true'
uses: peter-evans/create-pull-request@v8
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: "Update for ${{ steps.versions.outputs.retail_new }} (${{ steps.versions.outputs.date_new }})"
title: "Update for ${{ steps.versions.outputs.retail_new }} (${{ steps.versions.outputs.date_new }})"
body: |
This automatic update contains the following changes:
- Updated `ffxiv_versions_global.json`
- Generated opcode diff for retail version ${{ steps.versions.outputs.retail_new }}
branch: "auto-update"
branch-suffix: "short-commit-hash"
base: "main"
delete-branch: true