From f7cef920673211641e4d3361442f08a132c8acd1 Mon Sep 17 00:00:00 2001 From: Sebastien Larinier Date: Wed, 23 Jul 2025 09:43:20 +0200 Subject: [PATCH] Adds workflow to zip plugin directory on push Sets up a GitHub Actions workflow that automatically zips the plugin directory and commits the resulting zip file to the repository on each push to the main branch. This ensures that an up-to-date zip file of the plugin is always available. Also, renames a file to use a more standard name. --- .github/workflows/zip-plugin.yml | 34 +++++++++++++++++++ .../{fichiers à télécharger => }/install.md | 0 2 files changed, 34 insertions(+) create mode 100644 .github/workflows/zip-plugin.yml rename plugin/plugin_chrome/{fichiers à télécharger => }/install.md (100%) diff --git a/.github/workflows/zip-plugin.yml b/.github/workflows/zip-plugin.yml new file mode 100644 index 0000000..fc30750 --- /dev/null +++ b/.github/workflows/zip-plugin.yml @@ -0,0 +1,34 @@ +# Nom du workflow qui apparaîtra dans l'onglet "Actions" de GitHub +name: Zip Plugin Directory + +# Déclencheur : cette action se lancera à chaque push sur la branche "main" +on: + push: + branches: + - main # Tu peux changer "main" par "master" ou une autre branche si besoin + +jobs: + zip-and-commit: + # L'action tournera sur un serveur Ubuntu + 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 2: Zippe le répertoire spécifié + # L'option -r compresse le dossier et tout son contenu. + - name: Zip the plugin directory + run: | + zip -r "DIMA/plugin/plugin_chrome/fichiers à télécharger/Plugin-dima.zip" "DIMA/plugin/plugin_chrome/fichiers à télécharger/Plugin-dima" + + # Étape 3: Commit et pousse le fichier .zip sur le dépôt + # Cette action va créer un nouveau commit avec le fichier zip généré + - name: Commit and push the zip file + uses: stefanzweifel/git-auto-commit-action@v5 + with: + # Message du commit qui sera créé par l'action + commit_message: "CI: Auto-generate plugin zip file" + # Spécifie le fichier à ajouter au commit + file_pattern: 'DIMA/plugin/plugin_chrome/fichiers à télécharger/Plugin-dima.zip' diff --git a/plugin/plugin_chrome/fichiers à télécharger/install.md b/plugin/plugin_chrome/install.md similarity index 100% rename from plugin/plugin_chrome/fichiers à télécharger/install.md rename to plugin/plugin_chrome/install.md