forked from cleolibrary/CLEO4
-
Notifications
You must be signed in to change notification settings - Fork 6
168 lines (143 loc) · 6.22 KB
/
main.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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
name: CLEO 5 Release Build
on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+**'
jobs:
build:
runs-on: windows-2022
steps:
- uses: actions/checkout@v4
with:
submodules: "recursive"
- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v2
- uses: actions/setup-node@v4
with:
node-version: lts/*
- name: Read Version Tag
id: read_version
run: node.exe .github/workflows/version.js
- name: Core - Build
shell: cmd
run: |
set PLUGIN_SDK_DIR=%GITHUB_WORKSPACE%\third-party\plugin-sdk
msbuild -m CLEO5.sln /property:Configuration=Release /property:Platform=GTASA
# - name: Core - Sign
# uses: x87/code-sign-action@develop
# with:
# certificate: '${{ secrets.DIG_KEY_CERT }}'
# password: '${{ secrets.DIG_KEY_PWD }}'
# certificatename: 'Seemann'
# description: 'CLEO 5'
# timestampUrl: 'http://timestamp.digicert.com'
# filename: './.output/Release/cleo.asi'
- name: Core - VirusTotal Scan
uses: crazy-max/ghaction-virustotal@v4
with:
vt_api_key: ${{ secrets.VT_KEY }}
files: './.output/Release/CLEO.asi'
- name: Plugins - Build
shell: cmd
run: |
set PLUGIN_SDK_DIR=%GITHUB_WORKSPACE%\third-party\plugin-sdk
msbuild -m cleo_plugins/CLEO_Plugins.sln /property:Configuration=Release /property:Platform=x86
# - name: Plugins - Sign
# uses: x87/code-sign-action@develop
# with:
# certificate: '${{ secrets.DIG_KEY_CERT }}'
# password: '${{ secrets.DIG_KEY_PWD }}'
# certificatename: 'Seemann'
# description: 'CLEO 5 Plugin'
# timestampUrl: 'http://timestamp.digicert.com'
# folder: './cleo_plugins/.output'
- name: Plugins - VirusTotal Scan
uses: crazy-max/ghaction-virustotal@v4
with:
vt_api_key: ${{ secrets.VT_KEY }}
files: './cleo_plugins/.output/*.cleo'
- name: Gather Output Files
id: prepare_archive
shell: cmd
run: |
@REM create output directory
mkdir .output\Release\cleo
mkdir .output\Release\cleo\.config
mkdir .output\Release\cleo\cleo_modules
mkdir .output\Release\cleo\cleo_plugins
mkdir .output\Release\cleo\cleo_saves
mkdir .output\Release\cleo\cleo_text
mkdir .output\Release\cleo_readme
mkdir .output\Release\cleo_readme\examples
@REM copy files
copy source\cleo_config.ini .output\Release\cleo\.cleo_config.ini
copy cleo_plugins\.output\*.cleo .output\Release\cleo\cleo_plugins
copy cleo_plugins\.output\*.ini .output\Release\cleo\cleo_plugins
copy cleo_plugins\Audio\bass\bass.dll .output\Release\bass.dll
xcopy /E /I tests .output\Release\cleo
xcopy /E /I examples .output\Release\cleo_readme\examples
@REM copy SDK
copy .output\Release\CLEO.lib cleo_sdk\CLEO.lib
@REM download Sanny Builder Library json
curl https://raw.githubusercontent.com/sannybuilder/library/master/sa/sa.json -o .output\Release\cleo\.config\sa.json
- name: Convert Markdown to HTML
id: md_to_html
run: |
npm install showdown
node.exe .github/workflows/markdown.js
move README.html .output\Release\cleo_readme\README.html
move CHANGELOG.html .output\Release\cleo_readme\CHANGELOG.html
- name: Download ASI Loaders
id: download_asi_loaders
shell: cmd
run: |
xcopy /E /I .output\Release .output\Release_with_Silent_ASI_Loader
xcopy /E /I .output\Release .output\Release_with_Ultimate_ASI_Loader
@REM install Silent's ASI Loader
curl https://silent.rockstarvision.com/uploads/silents_asi_loader_13.zip -o silents_asi_loader_13.zip
powershell.exe -NoP -NonI -Command "Expand-Archive '.\silents_asi_loader_13.zip' '.\.output\Release_with_Silent_ASI_Loader'"
move .output\Release_with_Silent_ASI_Loader\ReadMe.txt ".output\Release_with_Silent_ASI_Loader\cleo_readme\ASI Loader Readme.txt"
rmdir /s /q .output\Release_with_Silent_ASI_Loader\advanced_plugin_management_example
rmdir /s /q .output\Release_with_Silent_ASI_Loader\scripts
@REM install Ultimate ASI Loader
curl https://github.com/ThirteenAG/Ultimate-ASI-Loader/releases/download/Win32-latest/vorbisFile-Win32.zip -L -o ual.zip
powershell.exe -NoP -NonI -Command "Expand-Archive '.\ual.zip' '.\.output\Release_with_Ultimate_ASI_Loader'"
rm .\.output\Release_with_Ultimate_ASI_Loader\vorbisFile-Win32.SHA512
- name: Pack Base Archive
uses: ThirteenAG/zip-release@master
with:
path: ./.output/Release/*
type: "zip"
filename: SA.CLEO_${{ github.ref_name }}.zip
exclusions: "*.pdb *.lib *.exp"
- name: Pack Base + Silent's ASI Loader
uses: ThirteenAG/zip-release@master
with:
path: ./.output/Release_with_Silent_ASI_Loader/*
type: "zip"
filename: SA.CLEO_${{ github.ref_name }}+Silent_ASI_Loader.zip
exclusions: "*.pdb *.lib *.exp"
- name: Pack Base + UAL
uses: ThirteenAG/zip-release@master
with:
path: ./.output/Release_with_Ultimate_ASI_Loader/*
type: "zip"
filename: SA.CLEO_${{ github.ref_name }}+Ultimate_ASI_Loader.zip
exclusions: "*.pdb *.lib *.exp"
- name: CLEO SDK
uses: ThirteenAG/zip-release@master
with:
path: ./cleo_sdk/*
type: "zip"
filename: SA.CLEO_${{ github.ref_name }}_SDK.zip
exclusions: "*.pdb *.exp"
- name: Upload Release
uses: ncipollo/release-action@main
with:
token: ${{ secrets.GITHUB_TOKEN }}
name: ${{ steps.read_version.outputs.version }}
bodyFile: 'changes.txt' # generated in read_version
tag: ${{ github.ref_name }}
prerelease: ${{ contains(github.ref_name, 'beta') || contains(github.ref_name, 'alpha') }}
artifacts: "SA.CLEO_*.zip"
allowUpdates: true