-
Notifications
You must be signed in to change notification settings - Fork 0
96 lines (88 loc) · 2.99 KB
/
deploy.yml
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
91
92
93
94
95
96
name: Online cache update
defaults:
run:
shell: bash
on:
workflow_dispatch:
schedule:
- cron: '0 * * * *'
concurrency: online-cache-update
jobs:
run:
runs-on: windows-latest
steps:
- name: Checkout main
uses: actions/checkout@v4
with:
path: main
- name: Checkout windhawk-mods
uses: actions/checkout@v4
with:
repository: ramensoftware/windhawk-mods
ref: pages
path: windhawk-mods
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install pefile requests
# Workaround for updating cache:
# https://github.com/actions/cache/issues/342#issuecomment-1363953531
- name: Restore cache - binaries and symbols
uses: actions/cache/restore@v4
id: cache-binaries-and-symbols
with:
path: binaries
key: cache-binaries-and-symbols-key-v1
- name: Rename cache folder
if: ${{ steps.cache-binaries-and-symbols.outputs.cache-hit }}
run: mv binaries binaries_previous
- name: Run 01_extract_mod_symbols
run: |
python -u main/scripts/01_extract_mod_symbols.py \
windhawk-mods/mods \
extracted_symbols.json
- name: Run 02_download_binaries
run: |
python -u main/scripts/02_download_binaries.py \
extracted_symbols.json \
binaries \
binaries_previous
- name: Run 03_extract_symbols_from_binaries
run: |
python -u main/scripts/03_extract_symbols_from_binaries.py \
binaries \
main/scripts/tools/windhawk-symbol-helper.exe \
main/scripts/tools \
symbols
- name: Run 04_create_mod_cache
run: |
python -u main/scripts/04_create_mod_cache.py \
binaries \
extracted_symbols.json \
symbol_cache
- name: Deploy
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./symbol_cache
user_name: 'github-actions[bot]'
user_email: 'github-actions[bot]@users.noreply.github.com'
publish_branch: 'gh-pages'
# Workaround for updating cache:
# https://github.com/actions/cache/issues/342#issuecomment-1363953531
- name: Clear cache - binaries and symbols
if: ${{ steps.cache-binaries-and-symbols.outputs.cache-hit }}
env:
GH_TOKEN: ${{ github.token }} # required by gh
run: |
gh extension install actions/gh-actions-cache
gh actions-cache delete cache-binaries-and-symbols-key-v1 --confirm -R ${{ github.repository }}
- name: Save cache - binaries and symbols
uses: actions/cache/save@v4
with:
path: binaries
key: cache-binaries-and-symbols-key-v1