From a6077ba5d3f8b294858adedbf29d0d5b2bb3c117 Mon Sep 17 00:00:00 2001 From: Krzysztof Modras Date: Wed, 5 Jun 2024 17:54:57 +0200 Subject: [PATCH] CI: auto configuration in one place --- .github/workflows/release.yml | 2 +- auto.config.js | 80 +++++++++++++++++++++++++++++++++++ package.json | 9 ---- tsconfig.eslint.json | 1 + 4 files changed, 82 insertions(+), 10 deletions(-) create mode 100644 auto.config.js diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9a751158c3..6731c8df5d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -44,7 +44,7 @@ jobs: private-key: ${{ secrets.ADBLOCKERBOT_PRIVATE_KEY }} - name: Create release - run: yarn release + run: yarn auto shipit -vv env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} NPM_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/auto.config.js b/auto.config.js new file mode 100644 index 0000000000..378d044faf --- /dev/null +++ b/auto.config.js @@ -0,0 +1,80 @@ +export default function rc() { + return { + name: 'Adblocker Bot', + email: 'adblocker-bot@users.noreply.github.com', + plugins: ['protected-branch', 'npm'], + labels: [ + { + name: 'PR: Breaking Change :boom:', + description: 'Increment major version when merged', + changelogTitle: ':boom: Breaking Change', + releaseType: 'major', + overwrite: true, + color: '#e2372b', + }, + { + name: 'PR: New Feature :rocket:', + description: 'Increment minor version when merged', + changelogTitle: ':rocket: New Feature', + releaseType: 'minor', + overwrite: true, + color: '#2e449b', + }, + { + name: 'PR: Performance :running_woman:', + description: 'Increment minor version when merged', + changelogTitle: ':running_woman: Performance', + releaseType: 'minor', + overwrite: true, + color: '#ead99f', + }, + { + name: 'PR: Bug Fix :bug:', + description: 'Increment patch version when merged', + changelogTitle: ':bug: Bug Fix', + releaseType: 'patch', + overwrite: true, + color: '#56dd97', + }, + { + name: 'PR: Polish :nail_care:', + description: 'Increment patch version when merged', + changelogTitle: ':nail_care: Polish', + releaseType: 'patch', + overwrite: true, + color: '#a9bbe8', + }, + { + name: 'PR: Internal :house:', + description: 'Changes only affect internals', + changelogTitle: ':house: Internal', + releaseType: 'none', + overwrite: true, + color: '#5b1482', + }, + { + name: 'PR: Docs :memo:', + description: 'Changes only affect documentation', + changelogTitle: ':memo: Documentation', + releaseType: 'none', + overwrite: true, + color: '#d2f28a', + }, + { + name: 'skip-release', + description: 'Preserve the current version when merged', + releaseType: 'skip', + overwrite: true, + color: '#e069cf', + }, + { + name: 'PR: Dependencies :nut_and_bolt:', + description: 'Changes only update dependencies', + changelogTitle: ':nut_and_bolt: Dependencies', + releaseType: 'none', + overwrite: true, + color: '#5dbdcc', + }, + ], + }; +} diff --git a/package.json b/package.json index 95c532ed05..13aa895df2 100644 --- a/package.json +++ b/package.json @@ -64,7 +64,6 @@ "build": "tsc --build ./tsconfig.project.json && lerna run build", "test": "lerna run --concurrency 4 test", "clean": "lerna run --parallel clean && lerna clean --yes", - "release": "auto shipit -v", "format-check": "prettier './packages/**/*.ts' --check", "format-fix": "prettier './packages/**/*.ts' --write" }, @@ -86,13 +85,5 @@ "typescript": "^5.4.5", "typescript-eslint": "8.0.0-alpha.24" }, - "auto": { - "extends": "@remusao/auto-config", - "name": "Adblocker Bot", - "email": "adblocker-bot@users.noreply.github.com", - "plugins": [ - "protected-branch" - ] - }, "packageManager": "yarn@4.2.2" } diff --git a/tsconfig.eslint.json b/tsconfig.eslint.json index 8ef8cc205d..119c725711 100644 --- a/tsconfig.eslint.json +++ b/tsconfig.eslint.json @@ -6,6 +6,7 @@ }, "extends": "./tsconfig.json", "include": [ + "auto.config.js", "eslint.config.js", ] }