2024-01-08 22:06:36 +00:00
|
|
|
name: Release-Win
|
2024-01-08 21:51:04 +00:00
|
|
|
on:
|
|
|
|
push:
|
|
|
|
tags:
|
|
|
|
- 'v*'
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build-windows:
|
|
|
|
runs-on: windows-2019
|
|
|
|
steps:
|
|
|
|
-
|
|
|
|
name: Checkout
|
2024-02-19 21:18:12 +00:00
|
|
|
uses: actions/checkout@v4
|
2024-01-08 21:51:04 +00:00
|
|
|
with:
|
|
|
|
path: hydrus
|
|
|
|
-
|
|
|
|
name: Setup Python
|
2024-02-19 21:18:12 +00:00
|
|
|
uses: actions/setup-python@v5
|
2024-01-08 21:51:04 +00:00
|
|
|
with:
|
2024-04-17 20:22:16 +00:00
|
|
|
python-version: '3.11'
|
2024-01-08 21:51:04 +00:00
|
|
|
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
|
2024-05-22 02:44:48 +00:00
|
|
|
run: Invoke-WebRequest -Uri "https://sourceforge.net/projects/mpv-player-windows/files/libmpv/mpv-dev-x86_64-20230820-git-19384e0.7z" -OutFile "mpv-dev-x86_64.7z" -Headers @{ "User-Agent" = "LetMeIn" }
|
2024-01-08 21:51:04 +00:00
|
|
|
-
|
|
|
|
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
|
2024-02-19 21:18:12 +00:00
|
|
|
run: Invoke-WebRequest -Uri "https://www.gyan.dev/ffmpeg/builds/ffmpeg-release-full.7z" -OutFile "ffmpeg-release-full.7z"
|
2024-01-08 21:51:04 +00:00
|
|
|
-
|
|
|
|
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
|
2024-02-19 21:18:12 +00:00
|
|
|
7z.exe a -tzip -mm=Deflate -mx=5 Windows-Extract.zip 'Hydrus Network'
|
2024-01-08 21:51:04 +00:00
|
|
|
cd ..
|
|
|
|
-
|
|
|
|
name: Extract Version Metadata
|
|
|
|
id: meta
|
|
|
|
run: |
|
2024-02-19 21:18:12 +00:00
|
|
|
$vs = "${{ github.ref_name }}".Substring(1)
|
|
|
|
echo "version_short=$vs" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append
|
|
|
|
-
|
2024-01-08 21:51:04 +00:00
|
|
|
name: Rename Files
|
|
|
|
run: |
|
2024-02-19 21:18:12 +00:00
|
|
|
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
|
2024-01-08 21:51:04 +00:00
|
|
|
-
|
|
|
|
name: Upload Files
|
2024-03-13 01:04:14 +00:00
|
|
|
uses: softprops/action-gh-release@v2
|
2024-01-08 21:51:04 +00:00
|
|
|
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
|