-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
70 lines (61 loc) · 2.32 KB
/
Copy pathupdate_examples.yml
File metadata and controls
70 lines (61 loc) · 2.32 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
name: Update examples collection
on:
workflow_dispatch:
push:
paths:
- 'examples/**'
pull_request:
paths:
- 'examples/**'
jobs:
build:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup emsdk
uses: mymindstorm/setup-emsdk@v14
with:
version: 'latest'
actions-cache-folder: 'emsdk-cache'
- name: Setup MSBuild
uses: microsoft/setup-msbuild@v2
- name: Clone raylib.com repo to update files
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git clone https://x-access-token:${GITHUB_TOKEN}@github.com/raysan5/raylib.com.git
shell: cmd
- name: Build and run rexm tool (VS2022 solution)
# rexm should update all required files in raylib and even raylib.com repo,
# but not sure if it can do that from an Action, maybe it requires manual copy
run: |
cd tools/rexm/VS2022
msbuild.exe rexm.sln /target:rexm /property:Configuration=Release /property:Platform=x64
cd ../../..
set REXM_EXAMPLES_BASE_PATH="examples"
set REXM_EXAMPLES_WEB_PATH="../raylib.com/examples"
set REXM_EXAMPLES_TEMPLATE_FILE_PATH="examples/examples_template.c"
set REXM_EXAMPLES_TEMPLATE_SCREENSHOT_PATH="examples/examples_template.png"
set REXM_EXAMPLES_COLLECTION_FILE_PATH="examples/examples_list.txt"
set REXM_EXAMPLES_VS2022_SLN_FILE="projects/VS2022/raylib.sln"
#set EMSDK_PATH="D:/a/raylib/raylib/emsdk-cache/emsdk-main"
.\tools\rexm\VS2022\build\rexm\bin\x64\Release\rexm.exe build core_basic_window
cd ../..
shell: cmd
- name: Commit changes to raylib repo
run: |
#git config user.name "github-actions[bot]"
#git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
#git add -A
#git commit -m "Update examples collection"
#git push
- name: Push changes to raylib.com repo
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
#git config --global user.name "github-actions[bot]"
#git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
#git add examples
#git commit -m "Update web examples"
#git push origin