forked from Tencent/puerts
-
Notifications
You must be signed in to change notification settings - Fork 0
159 lines (147 loc) · 6.5 KB
/
unreal_publish.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
name: unreal publish
on:
workflow_dispatch:
inputs:
publish_version:
description: 'publish_version'
required: true
env:
UE424_V8: "https://github.com/puerts/backend-v8/releases/download/v8_for_ue424_or_below/v8_for_ue424_or_below.tgz"
V8_84: "https://github.com/puerts/backend-v8/releases/download/V8_8.4.371.19_230822/v8_bin_8.4.371.19.tgz"
V8_94: "https://github.com/puerts/backend-v8/releases/download/V8_9.4.146.24__241009/v8_bin_9.4.146.24.tgz"
V8_106: "https://github.com/puerts/backend-v8/releases/download/V8_10.6.194__241009/v8_bin_10.6.194.tgz"
quickjs: "https://github.com/puerts/backend-quickjs/releases/download/QJS_241030/qjs_v8_bin.tgz"
nodejs: "https://github.com/puerts/backend-nodejs/releases/download/NodeJS_16.16.0_221228/nodejs_bin_16.16.0.tgz"
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Create Release Asset
run: |
cp -r README.md LICENSE doc unreal
wget -O v8_for_ue425.tgz -q ${{env.V8_84}}
tar xvfz v8_for_ue425.tgz -C unreal/Puerts/ThirdParty
cd unreal
tar cvfz puerts_v8_84.tgz Puerts README.md LICENSE doc
mv puerts_v8_84.tgz ..
cd ..
rm -r unreal/Puerts/ThirdParty/v8
wget -O v8_94.tgz -q ${{env.V8_94}}
tar xvfz v8_94.tgz -C unreal/Puerts/ThirdParty
cd unreal
cp Puerts/Source/JsEnv/JsEnv.Build.cs ..
sed -i 's/SupportedV8Versions.V8_4_371_19/SupportedV8Versions.V9_4_146_24/g' Puerts/Source/JsEnv/JsEnv.Build.cs
tar cvfz puerts_v8_94.tgz Puerts README.md LICENSE doc
mv puerts_v8_94.tgz ..
cd ..
rm -r unreal/Puerts/ThirdParty/v8_9.4.146.24
cp JsEnv.Build.cs unreal/Puerts/Source/JsEnv/JsEnv.Build.cs
wget -O V8_106.tgz -q ${{env.V8_106}}
tar xvfz V8_106.tgz -C unreal/Puerts/ThirdParty
cd unreal
sed -i 's/SupportedV8Versions.V8_4_371_19/SupportedV8Versions.V10_6_194/g' Puerts/Source/JsEnv/JsEnv.Build.cs
tar cvfz puerts_v8_106.tgz Puerts README.md LICENSE doc
mv puerts_v8_106.tgz ..
cd ..
rm -r unreal/Puerts/ThirdParty/v8_10.6.194
cp JsEnv.Build.cs unreal/Puerts/Source/JsEnv/JsEnv.Build.cs
wget -O v8_for_ue424.tgz -q ${{env.UE424_V8}}
tar xvfz v8_for_ue424.tgz -C unreal/Puerts/ThirdParty
cd unreal
tar cvfz puerts_v8_for_ue424_or_below.tgz Puerts README.md LICENSE doc
mv puerts_v8_for_ue424_or_below.tgz ..
cd ..
rm -r unreal/Puerts/ThirdParty/v8_for_ue424_or_below
wget -O quickjs.tgz -q ${{env.quickjs}}
tar xvfz quickjs.tgz -C unreal/Puerts/ThirdParty
cd unreal
sed -i 's/UseQuickjs = false/UseQuickjs = true/g' Puerts/Source/JsEnv/JsEnv.Build.cs
tar cvfz puerts_quickjs.tgz Puerts README.md LICENSE doc
mv puerts_quickjs.tgz ..
cd ..
rm -r unreal/Puerts/ThirdParty/quickjs
cp JsEnv.Build.cs unreal/Puerts/Source/JsEnv/JsEnv.Build.cs
git checkout .
wget -O nodejs_bin.tgz -q ${{env.nodejs}}
tar xvfz nodejs_bin.tgz -C unreal/Puerts/ThirdParty
cd unreal
sed -i 's/UseNodejs = false/UseNodejs = true/g' Puerts/Source/JsEnv/JsEnv.Build.cs
tar cvfz puerts_nodejs.tgz Puerts README.md LICENSE doc
mv puerts_nodejs.tgz ..
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
body: |
mac下如果遇到移入废纸篓问题,请
~~~bash
cd Plugins/Puerts/ThirdParty
find . -name "*.dylib" | xargs sudo xattr -r -d com.apple.quarantine
~~~
tag_name: Unreal_v${{ github.event.inputs.publish_version }}
release_name: Unreal_v${{ github.event.inputs.publish_version }}
draft: false
prerelease: false
- name: Upload Puerts Plugins default
#id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./puerts_v8_84.tgz
asset_name: puerts_v8_84.tgz
asset_content_type: application/tgz
- name: Upload Puerts Plugins with v8 9.4.146.24
#id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./puerts_v8_94.tgz
asset_name: puerts_v8_94.tgz
asset_content_type: application/tgz
- name: Upload Puerts Plugins with v8 10.6.194
#id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./puerts_v8_106.tgz
asset_name: puerts_v8_106.tgz
asset_content_type: application/tgz
- name: Upload Puerts Plugins UE424 Or Below
#id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./puerts_v8_for_ue424_or_below.tgz
asset_name: puerts_v8_for_ue424_or_below.tgz
asset_content_type: application/tgz
- name: Upload Puerts Plugins With Quickjs Backend
#id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./puerts_quickjs.tgz
asset_name: puerts_quickjs.tgz
asset_content_type: application/tgz
- name: Upload Puerts Plugins With Nodejs Backend
#id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./puerts_nodejs.tgz
asset_name: puerts_nodejs.tgz
asset_content_type: application/tgz