Skip to content

Merge pull request #15 from Ashraf-Khabar/create-the-installer-for-th… #5

Merge pull request #15 from Ashraf-Khabar/create-the-installer-for-th…

Merge pull request #15 from Ashraf-Khabar/create-the-installer-for-th… #5

Workflow file for this run

name: Build and Release BulkFolder
on:
push:
branches:
- main
jobs:
build:
runs-on: windows-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pyinstaller customtkinter matplotlib
- name: Get version from XML
id: get_version
shell: powershell
run: |
[xml]$project = Get-Content "project_info.xml"
$version = $project.project.version
echo "VERSION=$version" >> $env:GITHUB_OUTPUT
# Extraction de la version depuis project_info.xml
- name: Build EXE
run: |
# Création du lanceur pour éviter les erreurs d'import
echo "import sys, os; sys.path.insert(0, os.path.join(os.path.dirname(__file__), 'src')); from bulkfolder.ui.main import main; main()" > run.py
python -m PyInstaller --noconfirm --windowed --name "BulkFolder" --icon="src/assets/logo.ico" --add-data="src/assets;assets" --paths="src" --collect-all customtkinter run.py
- name: Compile Inno Setup
shell: pwsh
run: |
# On vérifie si le fichier existe avant de compiler
if (Test-Path "installer_script.iss") {
& "C:\Program Files (x86)\Inno Setup 6\ISCC.exe" "installer_script.iss"
} else {
Write-Error "Fichier installer_script.iss introuvable à la racine !"
exit 1
}
- name: Create Release
uses: softprops/action-gh-release@v1
with:
tag_name: v${{ steps.get_version.outputs.VERSION }}
name: Release v${{ steps.get_version.outputs.VERSION }}
files: Output/*.exe
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}