86 lines
2.5 KiB
YAML
86 lines
2.5 KiB
YAML
name: PyInstaller - Windows
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
inputs:
|
|
artemis_version:
|
|
description: 'Version'
|
|
required: true
|
|
default: '3.0.0'
|
|
type: string
|
|
|
|
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\
|
|
XCOPY /y _ArtemisUpdater.exe Artemis\
|
|
|
|
ECHO "Compress files themes+Artemis.exe -> Artemis.zip"
|
|
$compress = @{
|
|
Path = ".\Artemis.exe", "..\..\..\src\themes"
|
|
CompressionLevel = "Optimal"
|
|
DestinationPath = ".\Artemis.zip"
|
|
}
|
|
Compress-Archive @compress
|
|
|
|
$compress = @{
|
|
Path = ".\_ArtemisUpdater.exe"
|
|
CompressionLevel = "Optimal"
|
|
DestinationPath = ".\ArtemisUpdater.zip"
|
|
}
|
|
Compress-Archive @compress
|
|
|
|
ECHO "Compress all files for website download"
|
|
$compress = @{
|
|
Path = "Artemis"
|
|
CompressionLevel = "Optimal"
|
|
DestinationPath = ".\Artemis_v${{github.event.inputs.artemis_version}}_x64.zip"
|
|
}
|
|
Compress-Archive @compress
|
|
|
|
python ..\..\__get_hash_code.py Artemis.zip ArtemisUpdater.zip Artemis_v${{github.event.inputs.artemis_version}}_x64.zip > checksum_SHA256.txt
|
|
|
|
- uses: actions/upload-artifact@v3
|
|
with:
|
|
name: Artemis_v${{github.event.inputs.artemis_version}}_win_x64_PyInstaller
|
|
path: |
|
|
.\spec_files\Windows\output\Artemis.zip
|
|
.\spec_files\Windows\output\ArtemisUpdater.zip
|
|
.\spec_files\Windows\output\Artemis_v${{github.event.inputs.artemis_version}}_x64.zip
|
|
.\spec_files\Windows\output\checksum_SHA256.txt
|