зеркало из
https://github.com/M82-project/DIMA.git
synced 2025-10-30 05:26:11 +02:00
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.
30 строки
1.2 KiB
YAML
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'
|