diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4d725af..71bbddd 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -12,5 +12,48 @@ jobs: steps: - name: Run Release Please uses: google-github-actions/release-please-action@v4 + id: release with: - release-type: node + config-file: .release-please/config.json + manifest-file: .release-please/manifest.json + + # Formatter les fichiers modifiés par release-please, car ils ne + # respectent plus le formatage de Prettier (via Metalint). + # https://github.com/googleapis/release-please/issues/1802 + - name: Checkout repository + if: ${{ steps.release.outputs.pr }} + uses: actions/checkout@v4 + with: + ref: ${{ fromJson(steps.release.outputs.pr).headBranchName }} + + - name: Configure Git user + if: ${{ steps.release.outputs.pr }} + run: | + git config user.email "github-actions[bot]@users.noreply.github.com" + git config user.name "github-actions[bot]" + + - name: Setup Node.js + if: ${{ steps.release.outputs.pr }} + uses: actions/setup-node@v4 + with: + node-version: 20 + + - name: Install dependencies + if: ${{ steps.release.outputs.pr }} + run: npm ci + + - name: Format files + if: ${{ steps.release.outputs.pr }} + run: > + npm run lint:fix -- + .release-please/manifest.json + CHANGELOG.md + package.json + package-lock.json + src/extension/manifest.json + + - name: Commit and push + if: ${{ steps.release.outputs.pr }} + run: | + git commit --all --message 'chore: format files' + git push diff --git a/.metalint/markdownlint_changelog.config.js b/.metalint/markdownlint_changelog.config.js new file mode 100644 index 0000000..8f3edb1 --- /dev/null +++ b/.metalint/markdownlint_changelog.config.js @@ -0,0 +1,14 @@ +/** + * @module + * @license MIT + * @author Sébastien Règne + */ + +/** + * @type {import("markdownlint").Configuration} + */ +export default { + // Ne pas vérifier la longueur des lignes du CHANGELOG, car celui-ci est + // généré par release-please et il peut avoir de longues lignes. + "line-length": false, +}; diff --git a/.metalint/metalint.config.js b/.metalint/metalint.config.js index 30ff8db..3185c54 100644 --- a/.metalint/metalint.config.js +++ b/.metalint/metalint.config.js @@ -7,10 +7,9 @@ export default { patterns: [ "**", - // Ignorer les répertoires et les fichiers générés. + // Ignorer les répertoires générés. "!/.git/**", "!/.stryker/**", - "!/CHANGELOG.md", "!/jsdocs/**", "!/node_modules/**", "!/src/extension/polyfill/lib/**", @@ -87,6 +86,10 @@ export default { { patterns: "*.md", linters: ["prettier", "markdownlint"], + overrides: { + patterns: "/CHANGELOG.md", + linters: "markdownlint_changelog", + }, }, { patterns: "*.json", diff --git a/.release-please/config.json b/.release-please/config.json new file mode 100644 index 0000000..9656e8b --- /dev/null +++ b/.release-please/config.json @@ -0,0 +1,8 @@ +{ + "release-type": "node", + "include-component-in-tag": false, + "extra-files": ["src/extension/manifest.json"], + "packages": { + ".": {} + } +} diff --git a/.release-please/manifest.json b/.release-please/manifest.json new file mode 100644 index 0000000..15cc783 --- /dev/null +++ b/.release-please/manifest.json @@ -0,0 +1 @@ +{ ".": "0.10.0" } diff --git a/CHANGELOG.md b/CHANGELOG.md index 03bfd59..da68f2a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,45 +4,39 @@ All notable changes to this project will be documented in this file. See [standa ## [0.10.0](https://github.com/regseb/gout/compare/v0.9.8...v0.10.0) (2024-01-08) - ### Features -* Chainer les scrapers. ([04c094b](https://github.com/regseb/gout/commit/04c094b9f08b7ed980e27c57fd922d7e3f86e1fb)) - +- Chainer les scrapers. ([04c094b](https://github.com/regseb/gout/commit/04c094b9f08b7ed980e27c57fd922d7e3f86e1fb)) ### Bug Fixes -* Déplacer le scraper Repeater dans tools. ([da4af6f](https://github.com/regseb/gout/commit/da4af6fbf59a68223468b52abb401c2e683e5630)) -* **scraper/icon/ping:** Remplacer les points par des "x". ([402e2b4](https://github.com/regseb/gout/commit/402e2b400f16b92b6e9e193a7ae70f1dacc5ff9b)) +- Déplacer le scraper Repeater dans tools. ([da4af6f](https://github.com/regseb/gout/commit/da4af6fbf59a68223468b52abb401c2e683e5630)) +- **scraper/icon/ping:** Remplacer les points par des "x". ([402e2b4](https://github.com/regseb/gout/commit/402e2b400f16b92b6e9e193a7ae70f1dacc5ff9b)) ## [0.9.8](https://github.com/regseb/gout/compare/v0.9.7...v0.9.8) (2023-09-24) - ### Bug Fixes -* Corriger des fautes de français. ([ebb3cba](https://github.com/regseb/gout/commit/ebb3cba7bc03a738ef59055d857b2673dade3e32)) -* Corriger le nom des classes. ([c91d0fa](https://github.com/regseb/gout/commit/c91d0fa7befa9582dad35712b2a3fdf630183f31)) -* Gérer correctement les async / await. ([b017aaa](https://github.com/regseb/gout/commit/b017aaade74a678200fa4a8c597463fcd6296c33)) - -### [0.9.7](https://github.com/regseb/gout/compare/v0.9.6...v0.9.7) (2023-03-10) +- Corriger des fautes de français. ([ebb3cba](https://github.com/regseb/gout/commit/ebb3cba7bc03a738ef59055d857b2673dade3e32)) +- Corriger le nom des classes. ([c91d0fa](https://github.com/regseb/gout/commit/c91d0fa7befa9582dad35712b2a3fdf630183f31)) +- Gérer correctement les async / await. ([b017aaa](https://github.com/regseb/gout/commit/b017aaade74a678200fa4a8c597463fcd6296c33)) +## [0.9.7](https://github.com/regseb/gout/compare/v0.9.6...v0.9.7) (2023-03-10) ### Bug Fixes -* **extension:** Modifier la requête HTTP. ([d0de0f9](https://github.com/regseb/gout/commit/d0de0f947c53fb594cdd61956952b297dd226114)) -* Renommer "Configuration" en "Options". ([eb0a0ad](https://github.com/regseb/gout/commit/eb0a0adcffdb07559a5853b630701cdfc197ddca)) - -### [0.9.6](https://github.com/regseb/gout/compare/v0.9.5...v0.9.6) (2022-12-11) +- **extension:** Modifier la requête HTTP. ([d0de0f9](https://github.com/regseb/gout/commit/d0de0f947c53fb594cdd61956952b297dd226114)) +- Renommer "Configuration" en "Options". ([eb0a0ad](https://github.com/regseb/gout/commit/eb0a0adcffdb07559a5853b630701cdfc197ddca)) -### [0.9.5](https://github.com/regseb/gout/compare/v0.9.4...v0.9.5) (2022-10-23) +## [0.9.6](https://github.com/regseb/gout/compare/v0.9.5...v0.9.6) (2022-12-11) +## [0.9.5](https://github.com/regseb/gout/compare/v0.9.4...v0.9.5) (2022-10-23) ### Features -* Améliorer l'héritage de widgets. ([1c25ad3](https://github.com/regseb/gout/commit/1c25ad37d0063bed18f4065d980d78ef2250e7eb)) -* **module/findrss:** Ajouter un module pour extraire les flux RSS. ([e7b88a7](https://github.com/regseb/gout/commit/e7b88a7e534ae6b335b5bffa4341e35f0d17a995)) - +- Améliorer l'héritage de widgets. ([1c25ad3](https://github.com/regseb/gout/commit/1c25ad37d0063bed18f4065d980d78ef2250e7eb)) +- **module/findrss:** Ajouter un module pour extraire les flux RSS. ([e7b88a7](https://github.com/regseb/gout/commit/e7b88a7e534ae6b335b5bffa4341e35f0d17a995)) ### Bug Fixes -* **scraper/ping:** Gérer correctement les codes. ([b03035c](https://github.com/regseb/gout/commit/b03035ca4d5779653cbf0ab1811341a7c163d658)) +- **scraper/ping:** Gérer correctement les codes. ([b03035c](https://github.com/regseb/gout/commit/b03035ca4d5779653cbf0ab1811341a7c163d658))