-
-
Notifications
You must be signed in to change notification settings - Fork 162
77 lines (76 loc) · 2.44 KB
/
release_linux.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
name: Release-Linux
on:
push:
tags:
- 'v*'
jobs:
build-ubuntu:
runs-on: ubuntu-20.04
steps:
-
name: Checkout
uses: actions/checkout@v4
with:
path: hydrus
-
name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
architecture: x64
-
name: APT Install
run: |
sudo apt-get update
sudo apt-get install -y libmpv1
-
name: Pip Install
run: python3 -m pip install -r hydrus/static/build_files/linux/requirements.txt
-
name: Build docs to /help
run: mkdocs build -d help
working-directory: hydrus
-
name: Build Hydrus
run: |
cp hydrus/static/build_files/linux/hydrus_client.spec hydrus_client.spec
cp hydrus/static/build_files/linux/hydrus_server.spec hydrus_server.spec
pyinstaller hydrus_server.spec
pyinstaller hydrus_client.spec
-
name: Remove Chonk
run: |
find dist/hydrus_client/ -type f -name "*.pyc" -delete
while read line; do find dist/hydrus_client/ -type f -name "${line}" -delete ; done < hydrus/static/build_files/linux/files_to_delete.txt
-
name: Remove Surplus File
run: |
rm -f dist/hydrus_client/libxkbcommon.so*
-
name: Set Permissions
run: |
sudo chown --recursive 1000:1000 dist/hydrus_client
sudo find dist/hydrus_client -type d -exec chmod 0755 {} \;
sudo chmod +x dist/hydrus_client/hydrus_client dist/hydrus_client/hydrus_server dist/hydrus_client/bin/swfrender_linux
-
name: Compress Client
run: |
mv dist/hydrus_client "dist/Hydrus Network"
tar --zstd -cvf Ubuntu-Extract.tar.zst -C dist "Hydrus Network"
-
name: Extract Version Metadata
id: meta
run: |
echo "version=${GITHUB_REF##*/}" >> $GITHUB_ENV
echo "version_short=${GITHUB_REF##*/v}" >> $GITHUB_ENV
-
name: Rename Files
run: |
mv Ubuntu-Extract.tar.zst Hydrus.Network.${{ env.version_short }}.-.Linux.-.Executable.tar.zst
-
name: Upload Files
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
Hydrus.Network.${{ env.version_short }}.-.Linux.-.Executable.tar.zst