-
Notifications
You must be signed in to change notification settings - Fork 0
169 lines (141 loc) · 6.02 KB
/
Copy pathbuild.yml
File metadata and controls
169 lines (141 loc) · 6.02 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
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
169
name: Build and Release
on: workflow_dispatch
permissions: write-all
jobs:
Windows:
runs-on: windows-2019
steps:
- name: Checkout Repo
uses: actions/checkout@v4
- name: Setup Python 3.8
uses: actions/setup-python@v4
with:
python-version: '3.8'
cache: 'pip'
cache-dependency-path: |
requirement.txt
- name: Dependencies
shell: pwsh
run: |
python -m pip install tomli
python Tools/gen-requirements.py
python -m pip install --upgrade pip
python -m pip install -U -r requirements.txt
python -m pip uninstall numpy -y
python -m pip uninstall scipy -y
- name: Build
run: |
python -m lndl_nuitka . -y -- --disable-console
- name: Optimize
shell: pwsh
run: |
Remove-Item -Force -Recurse .\build\MEFrp-Launcher.dist\zstandard
Remove-Item -Force -Recurse .\build\MEFrp-Launcher.dist\pyexpat.pyd
Remove-Item -Force -Recurse .\build\MEFrp-Launcher-Qt.dist\qt5qml.dll
Remove-Item -Force -Recurse .\build\MEFrp-Launcher-Qt.dist\qt5qmlmodels.dll
Remove-Item -Force -Recurse .\build\MEFrp-Launcher-Qt.dist\qt5quick.dll
.\upx.exe -9 build/MEFrp-Launcher-Qt.dist/_ctypes.pyd build/MEFrp-Launcher-Qt.dist/_decimal.pyd build/MEFrp-Launcher-Qt.dist/_elementtree.pyd build/MEFrp-Launcher-Qt.dist/_lzma.pyd build/MEFrp-Launcher-Qt.dist/_overlapped.pyd build/MEFrp-Launcher-Qt.dist/_socket.pyd build/MEFrp-Launcher-Qt.dist/_ssl.pyd build/MEFrp-Launcher-Qt.dist/_win32sysloader.pyd build/MEFrp-Launcher-Qt.dist/libffi-7.dll build/MEFrp-Launcher-Qt.dist/libcrypto-1_1.dll build/MEFrp-Launcher-Qt.dist/libssl-1_1.dll build/MEFrp-Launcher-Qt.dist/MEFrp-Launcher-Qt.exe build/MEFrp-Launcher-Qt.dist/python38.dll build/MEFrp-Launcher-Qt.dist/pythoncom38.dll build/MEFrp-Launcher-Qt.dist/pywintypes38.dll build/MEFrp-Launcher-Qt.dist/qt5core.dll build/MEFrp-Launcher-Qt.dist/qt5dbus.dll build/MEFrp-Launcher-Qt.dist/qt5gui.dll build/MEFrp-Launcher-Qt.dist/qt5multimedia.dll build/MEFrp-Launcher-Qt.dist/qt5network.dll build/MEFrp-Launcher-Qt.dist/qt5printsupport.dll build/MEFrp-Launcher-Qt.dist/qt5svg.dll build/MEFrp-Launcher-Qt.dist/qt5websockets.dll build/MEFrp-Launcher-Qt.dist/qt5widgets.dll build/MEFrp-Launcher-Qt.dist/qt5xml.dll build/MEFrp-Launcher-Qt.dist/select.pyd build/MEFrp-Launcher-Qt.dist/unicodedata.pyd build/MEFrp-Launcher-Qt.dist/win32api.pyd build/MEFrp-Launcher-Qt.dist/win32gui.pyd build/MEFrp-Launcher-Qt.dist/win32print.pyd
- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: MEFrp-Launcher-Qt-Windows-x64
path: |
build/MEFrp-Launcher-Qt.dist/**/*
# Linux:
# runs-on: ubuntu-20.04
# steps:
# - name: Install Tools
# run: |
# sudo apt-get install libfuse2
# sudo apt-get install upx-ucl
# - name: Checkout Repo
# uses: actions/checkout@v4
# - name: Setup Python 3.8
# uses: actions/setup-python@v4
# with:
# python-version: '3.8'
# cache: 'pip'
# cache-dependency-path: |
# requirement.txt
# - name: Dependencies
# shell: pwsh
# run: |
# python -m pip install tomli
# python Tools/gen-requirements.py
# python -m pip install --upgrade pip
# python -m pip install -U -r requirements.txt
# python -m pip uninstall numpy -y
# python -m pip uninstall scipy -y
# - name: Build
# run: |
# python -m lndl_nuitka . -y -- --disable-console
# - name: Optimize
# run: |
# cd build
# cd MEFrp-Launcher-Qt.dist
# rm -r zstandard
# sudo rm libQt5Quick.so.5
# sudo rm libQt5Qml.so.5
# sudo rm libQt5QmlModels.so.5
# sudo rm _asyncio.so
# sudo rm _queue.so
# upx -9 MEFrp-Launcher-Qt.bin
# - name: Upload Artifacts
# uses: actions/upload-artifact@v3
# with:
# name: MEFrp-Launcher-Qt-Linux-x64
# path: |
# build/MEFrp-Launcher-Qt.dist/**/*
Release:
runs-on: ubuntu-20.04
needs:
- Windows
# - Linux
steps:
- uses: szenius/set-timezone@v1.0
with:
timezoneLinux: 'Asia/Shanghai'
- name: Install Tools
run: sudo apt install p7zip-full
- name: Download Artifacts
uses: actions/download-artifact@v3
- name: Checkout repository
uses: actions/checkout@v4
with:
path: repo
- name: Set Environment Variable
run: |
cd repo
version=$(python -c "from MELauncherLib import VERSION; print(VERSION)")
echo "VERSION=$version" >> $GITHUB_ENV
cd ..
- name: Compress
run: |
7z a -tzip "MEFrp-Launcher-Qt-${{ env.VERSION }}-Windows-x64.zip" "./MEFrp-Launcher-Qt-Windows-x64/*"
# 7z a -tzip "MEFrp-Launcher-Qt-${{ env.VERSION }}-Linux-x64.zip" "./MEFrp-Launcher-Qt-Linux-x64/*"
# mkdir Update
# cd Update
# mkdir Linux-x64 Windows-x64
# cd Linux-x64
# mkdir MELauncherLib
# cd ..
# cd Windows-x64
# mkdir MELauncherLib
# cd ..
# cp -r ../MEFrp-Launcher-Qt-Linux-x64/MEFrp-Launcher-Qt.bin Linux-x64/
# cp -r ../MEFrp-Launcher-Qt-Windows-x64/MEFrp-Launcher-Qt.exe Windows-x64/
# cp -r ../MEFrp-Launcher-Qt-Linux-x64/MELauncherLib/verification.so Linux-x64/
# cp -r ../MEFrp-Launcher-Qt-Windows-x64/MELauncherLib/verification.pyd Windows-x64/
# cd ..
# 7z a -tzip "Update-${{ env.VERSION }}.zip" "./Update/*"
- name: Release
uses: softprops/action-gh-release@v1
with:
body_path: ./repo/ChangeLog.md
prerelease: false
draft: false
tag_name: v${{ env.VERSION }}
files: |
*.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}