generated from KobeBryantBot/Native-Plugin-Template
-
Notifications
You must be signed in to change notification settings - Fork 1
109 lines (99 loc) · 3.13 KB
/
release.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
97
98
99
100
101
102
103
104
105
106
107
108
109
name: Publish Release
on:
release:
types:
- published
jobs:
build:
name: Build
runs-on: windows-2022
steps:
- name: Checkout repository
uses: actions/[email protected]
with:
fetch-depth: 1
submodules: 'true'
- name: Set up Python 3.13
uses: actions/setup-python@v5
with:
python-version: '3.13'
- name: Configure CMake (MSVC)
run: |
cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=MinSizeRel
shell: cmd
- name: Build all
run: |
cmake --build ${{github.workspace}}/build --config MinSizeRel
shell: cmd
- name: Upload Binary
uses: actions/[email protected]
with:
name: KobeBryantScriptEngine-Python-windows-x64
path: |
${{ github.workspace }}\bin\KobeBryantScriptEngine-Python\
- name: Upload Runtime
uses: actions/[email protected]
with:
name: Python313-windows-x64
path: |
${{ github.workspace }}\runtime\Python313-windows-x64.zip
- name: Upload KobeBryantAPI.pyi
uses: actions/[email protected]
with:
name: KobeBryantAPI.pyi
path: |
${{ github.workspace }}\python\KobeBryantAPI.pyi
- name: Upload KobeBryantEvent.py
uses: actions/[email protected]
with:
name: KobeBryantEvent.py
path: |
${{ github.workspace }}\python\KobeBryantEvent.py
upload-to-release:
needs:
- build
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Download KobeBryantAPI.pyi artifact
uses: actions/download-artifact@v3
with:
name: KobeBryantAPI.pyi
path: python-modules/
- name: Download KobeBryantEvent.py artifact
uses: actions/download-artifact@v3
with:
name: KobeBryantEvent.py
path: python-modules/
- name: Download windows-x64 artifact
uses: actions/download-artifact@v3
with:
name: KobeBryantScriptEngine-Python-windows-x64
path: release-win-x64/KobeBryantScriptEngine-Python/
- name: Download Python313 windows-x64 runtime
uses: actions/download-artifact@v3
with:
name: Python313-windows-x64
path: python-win-x64/
- name: Copy additional files
run: |
cp LICENSE README.md release-win-x64/
- name: Archive Windows-x64 directory
run: |
cd python-win-x64/
unzip Python313-windows-x64.zip -d ../release-win-x64/KobeBryantScriptEngine-Python
cd ..
cd release-win-x64/
zip -r ../KobeBryantScriptEngine-Python-windows-x64.zip *
cd ..
- name: Create GitHub Release
id: create_release
uses: softprops/action-gh-release@v1
with:
files: |
python-modules/KobeBryantAPI.pyi
python-modules/KobeBryantEvent.py
KobeBryantScriptEngine-Python-windows-x64.zip