diff --git a/.github/workflows/renovate.yml b/.github/workflows/renovate.yml new file mode 100644 index 0000000..ef72e2e --- /dev/null +++ b/.github/workflows/renovate.yml @@ -0,0 +1,21 @@ +name: Renovate + +on: + workflow_dispatch: + +permissions: + contents: write + pull-requests: write + +jobs: + renovate: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: renovatebot/github-action@v46.1.4 + with: + configurationFile: renovate.json + token: ${{ secrets.RENOVATE_TOKEN }} + env: + LOG_LEVEL: 'debug' + RENOVATE_REPOSITORIES: ${{ github.repository }} diff --git a/renovate.json b/renovate.json new file mode 100644 index 0000000..e238b1d --- /dev/null +++ b/renovate.json @@ -0,0 +1,62 @@ +{ + "$schema": "https://docs.renovatebot.com/renovate-schema.json", + "extends": ["config:recommended"], + "enabledManagers": ["mise", "custom.regex"], + "customManagers": [ + { + "customType": "regex", + "managerFilePatterns": ["/(^|/)Project\\.swift$/"], + "matchStrings": [ + "\\.remote\\(url:\\s*\"(?:https?:\\/\\/)?github\\.com\\/(?[\\w\\-_]+\\/[\\w\\-_.]+?)(?:\\.git)?\"[\\s,]*requirement:\\s*\\.(?:upToNextMajor|upToNextMinor)\\(from:\\s*\"(?[^\"]+)\"\\)" + ], + "datasourceTemplate": "github-releases" + }, + { + "customType": "regex", + "managerFilePatterns": ["/(^|/)Project\\.swift$/"], + "matchStrings": [ + "\\.remote\\(url:\\s*\"(?:https?:\\/\\/)?github\\.com\\/(?[\\w\\-_]+\\/[\\w\\-_.]+?)(?:\\.git)?\"[\\s,]*requirement:\\s*\\.(?:upToNextMajor|upToNextMinor)\\(from:\\s*\"(?[^\"]+)\"\\)" + ], + "datasourceTemplate": "github-tags" + }, + { + "customType": "regex", + "managerFilePatterns": ["/(^|/)Project\\.swift$/"], + "matchStrings": [ + "\\.remote\\(url:\\s*\"(?:https?:\\/\\/)?github\\.com\\/(?[\\w\\-_]+\\/[\\w\\-_.]+?)(?:\\.git)?\"[\\s,]*requirement:\\s*\\.exact\\(\"(?[^\"]+)\"\\)" + ], + "datasourceTemplate": "github-releases" + }, + { + "customType": "regex", + "managerFilePatterns": ["/(^|/)Project\\.swift$/"], + "matchStrings": [ + "\\.remote\\(url:\\s*\"(?:https?:\\/\\/)?github\\.com\\/(?[\\w\\-_]+\\/[\\w\\-_.]+?)(?:\\.git)?\"[\\s,]*requirement:\\s*\\.exact\\(\"(?[^\"]+)\"\\)" + ], + "datasourceTemplate": "github-tags" + } + ], + "packageRules": [ + { + "matchManagers": ["custom.regex"], + "groupName": "Swift dependencies", + "schedule": ["at any time"] + }, + { + "matchManagers": ["mise"], + "groupName": "Dev tools", + "schedule": ["at any time"] + }, + { + "matchUpdateTypes": ["patch"], + "automerge": true, + "automergeType": "branch" + }, + { + "matchUpdateTypes": ["minor", "major"], + "automerge": false + } + ], + "prConcurrentLimit": 3, + "prHourlyLimit": 2 +}