-
-
Notifications
You must be signed in to change notification settings - Fork 162
97 lines (96 loc) · 3.38 KB
/
release_win.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
name: Release-Win
on:
push:
tags:
- 'v*'
jobs:
build-windows:
runs-on: windows-2019
steps:
-
name: Checkout
uses: actions/checkout@v3
with:
path: hydrus
-
name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
architecture: x64
-
name: Pip Install
run: python3 -m pip install -r hydrus/static/build_files/windows/requirements.txt
-
name: Build docs to /help
run: mkdocs build -d help
working-directory: hydrus
-
name: Download mpv-dev
uses: carlosperate/download-file-action@v2
id: download_mpv
with:
file-url: 'https://sourceforge.net/projects/mpv-player-windows/files/libmpv/mpv-dev-x86_64-20230212-git-a40958c.7z'
file-name: 'mpv-dev-x86_64.7z'
location: '.'
-
name: Process mpv-dev
run: |
7z x mpv-dev-x86_64.7z -ompv
move mpv\libmpv-2.dll hydrus\mpv-2.dll
-
name: Download ffmpeg
uses: carlosperate/download-file-action@v2
id: download_ffmpeg
with:
file-url: 'https://www.gyan.dev/ffmpeg/builds/ffmpeg-release-full.7z'
file-name: 'ffmpeg-release-full.7z'
location: '.'
-
name: Process ffmpeg
run: |
7z e ffmpeg-release-full.7z -ohydrus/bin "**/bin/ffmpeg.exe"
-
name: Build Hydrus
run: |
move hydrus\static\build_files\windows\sqlite3.dll hydrus\
move hydrus\static\build_files\windows\sqlite3.exe hydrus\db
move hydrus\static\build_files\windows\file_version_info_maker.py file_version_info_maker.py
python file_version_info_maker.py ${{ github.ref_name }}
move hydrus\static\build_files\windows\hydrus_client.spec hydrus_client.spec
move hydrus\static\build_files\windows\hydrus_server.spec hydrus_server.spec
pyinstaller hydrus_server.spec
pyinstaller hydrus_client.spec
move dist\hydrus_client "dist\Hydrus Network"
-
# yo pretty sure we'll need to install this manually once we are on windows server 2022
# https://github.com/actions/virtual-environments/issues/4856
name: InnoSetup
run: |
move hydrus\static\build_files\windows\InnoSetup.iss InnoSetup.iss
ISCC.exe InnoSetup.iss /DVersion=${{ github.ref_name }}
-
name: Compress Client
run: |
cd .\dist
7z.exe a -tzip -mm=Deflate -mx=5 Windows-Extract.zip 'Hydrus Network'
cd ..
-
name: Extract Version Metadata
id: meta
run: |
echo "version=${{ github.ref_name }}" >> %GITHUB_ENV%
echo "version_short=%version:~1%" >> %GITHUB_ENV%
-
name: Rename Files
run: |
move dist\HydrusInstaller.exe Hydrus.Network.${{ env.version_short }}.-.Windows.-.Installer.exe
move dist\Windows-Extract.zip Hydrus.Network.${{ env.version_short }}.-.Windows.-.Extract.only.zip
-
name: Upload Files
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
Hydrus.Network.${{ env.version_short }}.-.Windows.-.Installer.exe
Hydrus.Network.${{ env.version_short }}.-.Windows.-.Extract.only.zip