80 lines
2.3 KiB
YAML
80 lines
2.3 KiB
YAML
name: PyInstaller - Windows
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
windows-pyinstaller:
|
|
runs-on: windows-2022
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
|
|
- name: Use Python 3.9
|
|
uses: actions/setup-python@v4
|
|
with:
|
|
python-version: '3.9'
|
|
|
|
- name: Install dependencies
|
|
run: pip install -r ./requirements/requirements.txt
|
|
|
|
- name: Install PyInstaller
|
|
run: |
|
|
pip install pyinstaller
|
|
|
|
- name: Build Artemis main executables
|
|
run: |
|
|
CD spec_files\Windows
|
|
|
|
ECHO "Building Artemis executable..."
|
|
MKDIR output
|
|
pyinstaller artemis.spec
|
|
MOVE dist\Artemis.exe .\output\Artemis.exe
|
|
RMDIR -recurse -force dist
|
|
RMDIR -recurse -force build
|
|
|
|
ECHO "Building updater..."
|
|
pyinstaller updater.spec
|
|
MOVE dist\_ArtemisUpdater.exe .\output\_ArtemisUpdater.exe
|
|
RMDIR -recurse -force dist
|
|
RMDIR -recurse -force build
|
|
|
|
CD output
|
|
MKDIR Artemis
|
|
XCOPY /y Artemis.exe Artemis\
|
|
XCOPY /e /k /y ..\..\..\src\themes Artemis\themes\ /EXCLUDE:..\excluded_files.txt
|
|
XCOPY /y _ArtemisUpdater.exe Artemis\
|
|
|
|
ECHO "Compress files themes+Artemis.exe -> Artemis.zip"
|
|
$compress = @{
|
|
Path = ".\Artemis.exe", "..\..\..\src\themes"
|
|
CompressionLevel = "Optimal"
|
|
DestinationPath = ".\Artemis_win.zip"
|
|
}
|
|
Compress-Archive @compress
|
|
|
|
$compress = @{
|
|
Path = ".\_ArtemisUpdater.exe"
|
|
CompressionLevel = "Optimal"
|
|
DestinationPath = ".\_ArtemisUpdater_win.zip"
|
|
}
|
|
Compress-Archive @compress
|
|
|
|
ECHO "Compress all files for website download"
|
|
$compress = @{
|
|
Path = "Artemis"
|
|
CompressionLevel = "Optimal"
|
|
DestinationPath = ".\ArtemisWebsite_win.zip"
|
|
}
|
|
Compress-Archive @compress
|
|
|
|
python ..\..\__get_hash_code.py Artemis_win.zip _ArtemisUpdater_win.zip ArtemisWebsite_win.zip > checksum.txt
|
|
|
|
- uses: actions/upload-artifact@v3
|
|
with:
|
|
name: Artemis_Windows
|
|
path: |
|
|
.\spec_files\Windows\output\Artemis_win.zip
|
|
.\spec_files\Windows\output\_ArtemisUpdater_win.zip
|
|
.\spec_files\Windows\output\ArtemisWebsite_win.zip
|
|
.\spec_files\Windows\output\checksum.txt
|