DIMA/.github/workflows/zip-plugin.yml
Sebastien Larinier bd24073bf1
Automates plugin zip file generation
Refactors the zip plugin workflow to correctly zip the plugin directory and commit the generated zip file to the repository.

The workflow now changes the working directory before zipping to avoid path issues and includes a debugging step to verify the directory structure.
2025-07-23 09:46:17 +02:00

30 строки
1.2 KiB
YAML

jobs:
zip-and-commit:
runs-on: ubuntu-latest
steps:
# Étape 1: Récupère le code de ton dépôt
- name: Checkout repository
uses: actions/checkout@v4
# Étape de débogage : Lister le contenu pour vérifier le chemin
- name: Verify directory path
run: |
echo "Listing contents to find the target directory:"
ls -R
# Étape 2: Zippe le répertoire
- name: Zip the plugin directory
run: |
# On se place dans le dossier parent pour éviter les problèmes de chemin
cd "DIMA/plugin/plugin_chrome/fichiers à télécharger/"
# On compresse le dossier "Plugin-dima" dans une archive "Plugin-dima.zip"
zip -r Plugin-dima.zip Plugin-dima
# Étape 3: Commit et pousse le fichier .zip
- name: Commit and push the zip file
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "CI: Auto-generate plugin zip file"
# L'action trouvera automatiquement le nouveau zip dans le bon dossier
file_pattern: 'DIMA/plugin/plugin_chrome/fichiers à télécharger/Plugin-dima.zip'