diff --git a/.github/workflows/create-release.yml b/.github/workflows/create-release.yml new file mode 100644 index 0000000..26ed0b7 --- /dev/null +++ b/.github/workflows/create-release.yml @@ -0,0 +1,41 @@ +# Nom du workflow +name: Créer une Release et y attacher le Zip + +# --- DÉCLENCHEUR --- +# Se déclenche uniquement quand un nouveau tag commençant par 'v' est poussé +on: + push: + tags: + - 'v*' + +# --- TÂCHES (JOBS) --- +jobs: + build-and-release: + runs-on: ubuntu-latest + + # --- PERMISSIONS --- + # Autorise l'action à créer une Release sur le dépôt + permissions: + contents: write + + steps: + # Étape 1 : Récupération du code + - name: 1. Récupération du code + uses: actions/checkout@v4 + + # Étape 2 : Création de l'archive .zip en utilisant le nouveau chemin + - name: 2. Compression du répertoire du plugin + run: | + cd "plugin/plugin_chrome/releases/" + zip -r Plugin-dima.zip Plugin-dima + + # Étape 3 : Création de la Release et ajout du .zip + - name: 3. Création de la Release + uses: softprops/action-gh-release@v2 + with: + # Le nom de la release sera le nom du tag (ex: "Release v1.1") + name: Release ${{ github.ref_name }} + # Génère automatiquement les notes de version + generate_release_notes: true + # Attache le fichier .zip depuis le nouveau chemin + files: plugin/plugin_chrome/releases/Plugin-dima.zip diff --git a/.github/workflows/zip-plugin.yml b/.github/workflows/zip-plugin.yml new file mode 100644 index 0000000..d7023ff --- /dev/null +++ b/.github/workflows/zip-plugin.yml @@ -0,0 +1,46 @@ +# Nom du workflow qui apparaîtra dans l'onglet "Actions" de votre dépôt GitHub +name: Créer l'archive du plugin + +# --- DÉCLENCHEUR --- +# Cette section indique à GitHub de lancer l'action à chaque push sur la branche 'main'. +# Si votre branche principale s'appelle 'master', remplacez 'main' ci-dessous. +on: + push: + branches: + - main + +# --- TÂCHES (JOBS) --- +# Un workflow est composé d'une ou plusieurs tâches qui s'exécutent sur des serveurs. +jobs: + # Nom de la tâche + zip-and-commit: + # Utilise un serveur Ubuntu récent pour exécuter les commandes + runs-on: ubuntu-latest + + # --- ÉTAPES (STEPS) --- + # Liste des actions à exécuter séquentiellement + steps: + # Étape 1 : Récupérer le code de votre dépôt sur le serveur + # C'est indispensable pour pouvoir accéder à vos fichiers. + - name: 1. Récupération du code + uses: actions/checkout@v4 + + # Étape 2 : Créer l'archive Zip + # Cette étape se déplace dans le bon dossier puis lance la compression. + # C'est la méthode la plus fiable pour gérer les chemins complexes. + - name: 2. Compression du répertoire en .zip + run: | + cd "plugin/plugin_chrome/releases/" + zip -r Plugin-dima.zip Plugin-dima + + # Étape 3 : Commiter et pousser le fichier .zip sur le dépôt + # Utilise une action pré-faite pour commiter le fichier zip généré. + # Le commit sera fait automatiquement au nom de "GitHub Actions". + - name: 3. Commit de l'archive sur le dépôt + uses: stefanzweifel/git-auto-commit-action@v5 + with: + # Le message du commit qui sera créé + commit_message: "🤖 CI : Mise à jour automatique de l'archive Plugin-dima.zip" + + # Le chemin exact du fichier à commiter + file_pattern: 'plugin/plugin_chrome/releases/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 diff --git a/plugin/plugin_chrome/releases/Plugin-dima.zip b/plugin/plugin_chrome/releases/Plugin-dima.zip new file mode 100644 index 0000000..ee98af6 Binary files /dev/null and b/plugin/plugin_chrome/releases/Plugin-dima.zip differ diff --git a/plugin/plugin_chrome/fichiers à télécharger/Plugin-dima/M82-logo-128.png b/plugin/plugin_chrome/releases/Plugin-dima/M82-logo-128.png similarity index 100% rename from plugin/plugin_chrome/fichiers à télécharger/Plugin-dima/M82-logo-128.png rename to plugin/plugin_chrome/releases/Plugin-dima/M82-logo-128.png diff --git a/plugin/plugin_chrome/fichiers à télécharger/Plugin-dima/M82-logo-16.png b/plugin/plugin_chrome/releases/Plugin-dima/M82-logo-16.png similarity index 100% rename from plugin/plugin_chrome/fichiers à télécharger/Plugin-dima/M82-logo-16.png rename to plugin/plugin_chrome/releases/Plugin-dima/M82-logo-16.png diff --git a/plugin/plugin_chrome/fichiers à télécharger/Plugin-dima/M82-logo-48.png b/plugin/plugin_chrome/releases/Plugin-dima/M82-logo-48.png similarity index 100% rename from plugin/plugin_chrome/fichiers à télécharger/Plugin-dima/M82-logo-48.png rename to plugin/plugin_chrome/releases/Plugin-dima/M82-logo-48.png diff --git a/plugin/plugin_chrome/fichiers à télécharger/Plugin-dima/content.js b/plugin/plugin_chrome/releases/Plugin-dima/content.js similarity index 100% rename from plugin/plugin_chrome/fichiers à télécharger/Plugin-dima/content.js rename to plugin/plugin_chrome/releases/Plugin-dima/content.js diff --git a/plugin/plugin_chrome/fichiers à télécharger/Plugin-dima/data/keywords.js b/plugin/plugin_chrome/releases/Plugin-dima/data/keywords.js similarity index 100% rename from plugin/plugin_chrome/fichiers à télécharger/Plugin-dima/data/keywords.js rename to plugin/plugin_chrome/releases/Plugin-dima/data/keywords.js diff --git a/plugin/plugin_chrome/fichiers à télécharger/Plugin-dima/data/techniques.js b/plugin/plugin_chrome/releases/Plugin-dima/data/techniques.js similarity index 100% rename from plugin/plugin_chrome/fichiers à télécharger/Plugin-dima/data/techniques.js rename to plugin/plugin_chrome/releases/Plugin-dima/data/techniques.js diff --git a/plugin/plugin_chrome/fichiers à télécharger/Plugin-dima/manifest.json b/plugin/plugin_chrome/releases/Plugin-dima/manifest.json similarity index 100% rename from plugin/plugin_chrome/fichiers à télécharger/Plugin-dima/manifest.json rename to plugin/plugin_chrome/releases/Plugin-dima/manifest.json diff --git a/plugin/plugin_chrome/fichiers à télécharger/Plugin-dima/modules/contentExtractor.js b/plugin/plugin_chrome/releases/Plugin-dima/modules/contentExtractor.js similarity index 100% rename from plugin/plugin_chrome/fichiers à télécharger/Plugin-dima/modules/contentExtractor.js rename to plugin/plugin_chrome/releases/Plugin-dima/modules/contentExtractor.js diff --git a/plugin/plugin_chrome/fichiers à télécharger/Plugin-dima/modules/techniqueAnalyzer.js b/plugin/plugin_chrome/releases/Plugin-dima/modules/techniqueAnalyzer.js similarity index 100% rename from plugin/plugin_chrome/fichiers à télécharger/Plugin-dima/modules/techniqueAnalyzer.js rename to plugin/plugin_chrome/releases/Plugin-dima/modules/techniqueAnalyzer.js diff --git a/plugin/plugin_chrome/fichiers à télécharger/Plugin-dima/modules/uiManager.js b/plugin/plugin_chrome/releases/Plugin-dima/modules/uiManager.js similarity index 100% rename from plugin/plugin_chrome/fichiers à télécharger/Plugin-dima/modules/uiManager.js rename to plugin/plugin_chrome/releases/Plugin-dima/modules/uiManager.js