Loading...
Loading...
Sets up Renovate automated dependency updates for Tuist iOS projects. Detects integration style (Project.swift-based or Tuist/Package.swift-based), handles registry vs URL packages, and creates renovate.json plus an optional GitHub Actions workflow. Use when you want to automate dependency bump PRs for a Tuist project.
npx skill4agent add 2sem/tuist-renovate-skill setup-renovate-for-tuistrenovate.jsonTuist.swiftTuist/dependencies// Tuist/Package.swift
let package = Package(
dependencies: [
.package(url: "https://github.com/firebase/firebase-ios-sdk", from: "11.8.1")
]
)Project.swiftpackages:grep -rl "packages:" --include="Project.swift" .// (location varies per project)
let project = Project(
packages: [
.remote(url: "https://github.com/firebase/firebase-ios-sdk", requirement: .upToNextMajor(from: "11.8.1"))
]
)A project uses one style only. Ifhas non-empty dependencies → Tuist/Package.swift-based. If anyTuist/Package.swiftfile has a non-emptyProject.swiftarray → Project.swift-based.packages:
| Format | Example |
|---|---|
| URL-based | |
| Registry-based | |
| URL-based (Project.swift) | |
requirement: .branch("...")mise.tomlschedulerenovate.json| User preference | Renovate schedule value |
|---|---|
| Monday morning | |
| Friday afternoon | |
| Weekly (any) | |
| Daily | |
renovate.jsonPackage.swift/(^|/)Package\.swift/Tuist/Package.swift{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": ["config:recommended"],
"packageRules": [
{
"matchManagers": ["swift"],
"groupName": "Swift dependencies",
"schedule": ["<schedule>"]
}
]
}url:id:customManagersfrom:exact:firebase.firebase-ios-sdkfirebase/firebase-ios-sdk{{{ }}}packageNameTemplate/{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": ["config:recommended"],
"enabledManagers": ["custom.regex"],
"customManagers": [
{
"customType": "regex",
"managerFilePatterns": ["/Tuist/Package\\.swift/"],
"matchStrings": [
"\\.package\\(id:\\s*\"(?<depName>[\\w\\-.]+?)\"[\\s\\S]*?(?:from|exact):\\s*\"(?<currentValue>[^\"]+)\"\\)"
],
"datasourceTemplate": "github-releases",
"packageNameTemplate": "{{{replace '\\.' '/' depName}}}"
},
{
"customType": "regex",
"managerFilePatterns": ["/Tuist/Package\\.swift/"],
"matchStrings": [
"\\.package\\(id:\\s*\"(?<depName>[\\w\\-.]+?)\"[\\s\\S]*?(?:from|exact):\\s*\"(?<currentValue>[^\"]+)\"\\)"
],
"datasourceTemplate": "github-tags",
"packageNameTemplate": "{{{replace '\\.' '/' depName}}}"
}
],
"packageRules": [
{
"matchManagers": ["custom.regex"],
"groupName": "Swift dependencies",
"schedule": ["<schedule>"]
}
]
}Note on dotted repo names: If a repo name had dots replaced with underscores (e.g.,), thegroue.GRDB_swiftreplacementpackageNameTemplatewon't match the real GitHub repogroue/GRDB_swift. For these packages, add an explicitgroue/GRDB.swiftoverride:packageRulesjson{ "matchPackageNames": ["groue.GRDB_swift"], "packageName": "groue/GRDB.swift" }
.remote(url:)https://.git.upToNextMajor.upToNextMinor.exact{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": ["config:recommended"],
"enabledManagers": ["custom.regex"],
"customManagers": [
{
"customType": "regex",
"managerFilePatterns": ["/(^|/)Project\\.swift$/"],
"matchStrings": [
"\\.remote\\(url:\\s*\"(?:https?:\\/\\/)?github\\.com\\/(?<depName>[\\w\\-_]+\\/[\\w\\-_.]+?)(?:\\.git)?\"[\\s\\S]*?requirement:\\s*\\.(?:upToNextMajor|upToNextMinor)\\(from:\\s*\"(?<currentValue>[^\"]+)\"\\)"
],
"datasourceTemplate": "github-releases"
},
{
"customType": "regex",
"managerFilePatterns": ["/(^|/)Project\\.swift$/"],
"matchStrings": [
"\\.remote\\(url:\\s*\"(?:https?:\\/\\/)?github\\.com\\/(?<depName>[\\w\\-_]+\\/[\\w\\-_.]+?)(?:\\.git)?\"[\\s\\S]*?requirement:\\s*\\.(?:upToNextMajor|upToNextMinor)\\(from:\\s*\"(?<currentValue>[^\"]+)\"\\)"
],
"datasourceTemplate": "github-tags"
},
{
"customType": "regex",
"managerFilePatterns": ["/(^|/)Project\\.swift$/"],
"matchStrings": [
"\\.remote\\(url:\\s*\"(?:https?:\\/\\/)?github\\.com\\/(?<depName>[\\w\\-_]+\\/[\\w\\-_.]+?)(?:\\.git)?\"[\\s\\S]*?requirement:\\s*\\.exact\\(\"(?<currentValue>[^\"]+)\"\\)"
],
"datasourceTemplate": "github-releases"
},
{
"customType": "regex",
"managerFilePatterns": ["/(^|/)Project\\.swift$/"],
"matchStrings": [
"\\.remote\\(url:\\s*\"(?:https?:\\/\\/)?github\\.com\\/(?<depName>[\\w\\-_]+\\/[\\w\\-_.]+?)(?:\\.git)?\"[\\s\\S]*?requirement:\\s*\\.exact\\(\"(?<currentValue>[^\"]+)\"\\)"
],
"datasourceTemplate": "github-tags"
}
],
"packageRules": [
{
"matchManagers": ["custom.regex"],
"groupName": "Swift dependencies",
"schedule": ["<schedule>"]
}
]
}customManagersenabledManagers{
"enabledManagers": ["custom.regex"]
}requirement: .branch("..."){
"matchDatasources": ["git-refs"],
"enabled": false
}mise.tomlmiseenabledManagers{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": ["config:recommended"],
"enabledManagers": ["mise", "custom.regex"],
"packageRules": [
{
"matchManagers": ["mise"],
"groupName": "Dev tools",
"schedule": ["<schedule>"]
}
]
}Themanager readsmiseand updates tool versions likemise.toml,tuist, etc.swiftlint
{
"packageRules": [
{
"matchUpdateTypes": ["patch"],
"automerge": true,
"automergeType": "branch"
},
{
"matchUpdateTypes": ["minor"],
"automerge": false
},
{
"matchUpdateTypes": ["major"],
"automerge": false
}
]
}{
"prConcurrentLimit": 3,
"prHourlyLimit": 2
}renovate.jsonrenovate --versionnpm install -g renovateRENOVATE_TOKEN=<github-pat> renovate --dry-run=full <org>/<repo>repomatched 0 filesmanagerFilePatternsdepNamefirebase/firebase-ios-sdkfirebase.firebase-ios-sdkmatchStrings[\s\S]*?.upToNextMinor.exactrenovate.jsonls .github/workflows/grep -rl "renovate" .github/workflows/.github/workflows/renovate.ymlname: Renovate
on:
schedule:
- cron: '<cron expression matching chosen schedule>'
workflow_dispatch:
permissions:
contents: write
pull-requests: write
jobs:
renovate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: renovatebot/github-action@v40
with:
configurationFile: renovate.json
token: ${{ secrets.RENOVATE_TOKEN }}RENOVATE_TOKENrepohttps://app.renovatebot.com/dashboard| Issue | Fix |
|---|---|
| No PRs created | Confirm |
| Test the regex against your actual Swift file at regex101.com (use JavaScript flavor) |
| Multiline declarations not detected | Ensure |
| Registry package PRs have wrong version | Override |
| Renovate opens too many PRs at once | Add |
| Package updates break build | Add |
| Renovate scan is very slow | Add |
renovate.jsoncustomManagersrenovate --dry-run.github/workflows/renovate.ymlRENOVATE_TOKEN