Skip to content

Commit

Permalink
ci: add semantic release
Browse files Browse the repository at this point in the history
  • Loading branch information
coreyar committed Nov 21, 2024
1 parent b01ee90 commit cc17394
Show file tree
Hide file tree
Showing 15 changed files with 4,188 additions and 112 deletions.
5 changes: 5 additions & 0 deletions commitlint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = {
extends: ["@commitlint/config-conventional"],
ignores: [commit => commit.includes("[skip ci]"), commit => commit.includes("Merge pull request")],
"type-enum": [2, "always", ["build", "chore", "ci", "docs", "feat", "fix", "refactor", "test"]],
};
6 changes: 6 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@
},
"devDependencies": {
"@chainlink/contracts": "^0.5.1",
"@commitlint/cli": "^17.0.3",
"@commitlint/config-conventional": "^17.0.3",
"@graphprotocol/client-cli": "3.0.0",
"@graphprotocol/graph-cli": "^0.80.0",
"@graphprotocol/graph-ts": "^0.35.1",
Expand All @@ -41,6 +43,10 @@
"@nomicfoundation/hardhat-network-helpers": "^1.0.4",
"@nomiclabs/hardhat-ethers": "^2.1.1",
"@nomiclabs/hardhat-etherscan": "^3.1.0",
"@semantic-release/changelog": "^6.0.3",
"@semantic-release/exec": "^6.0.3",
"@semantic-release/git": "^10.0.1",
"@semantic-release/npm": "^11.0.1",
"@trivago/prettier-plugin-sort-imports": "^3.2.0",
"@typechain/ethers-v5": "^10.1.0",
"@typechain/hardhat": "^6.1.2",
Expand Down
86 changes: 86 additions & 0 deletions subgraphs/cross-chain-governance/.releaserc
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
{
"extends": "semantic-release-monorepo",
"plugins": [
[
"@semantic-release/commit-analyzer",
{
"preset": "conventionalcommits",
"releaseRules": [
{
"breaking": true,
"release": "major"
},
{
"type": "build",
"release": false
},
{
"type": "chore",
"release": false
},
{
"type": "docs",
"release": "patch"
},
{
"type": "ci",
"release": false
},
{
"type": "feat",
"release": "minor"
},
{
"type": "fix",
"release": "patch"
},
{
"type": "refactor",
"release": "patch"
},
{
"type": "test",
"release": false
}
],
"parserOpts": {
"noteKeywords": [
"BREAKING CHANGE",
"BREAKING CHANGES"
]
}
}
],
[
"@semantic-release/release-notes-generator",
{
"preset": "conventionalcommits"
}
],
[
"@semantic-release/npm",
{
"npmPublish": false
}
],
[
"@semantic-release/git",
{
"assets": [
"package.json",
"yarn.lock"
],
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
}
]
],
"branches": [
{
"name": "main"
},
{
"name": "[!main]",
"prerelease": "pr"
}
]
}
7 changes: 5 additions & 2 deletions subgraphs/cross-chain-governance/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,10 @@
"apollo-fetch": "^0.7.0",
"hardhat": "^2.10.2",
"ts-node": "^10.9.2",
"urql": "^3.0.3",
"venus-subgraph-utils": "0.0.0"
"urql": "^3.0.3"
},
"devDependencies": {
"semantic-release": "^23.1.1",
"semantic-release-monorepo": "^8.0.2"
}
}
86 changes: 86 additions & 0 deletions subgraphs/etherfi-promo/.releaserc
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
{
"extends": "semantic-release-monorepo",
"plugins": [
[
"@semantic-release/commit-analyzer",
{
"preset": "conventionalcommits",
"releaseRules": [
{
"breaking": true,
"release": "major"
},
{
"type": "build",
"release": false
},
{
"type": "chore",
"release": false
},
{
"type": "docs",
"release": "patch"
},
{
"type": "ci",
"release": false
},
{
"type": "feat",
"release": "minor"
},
{
"type": "fix",
"release": "patch"
},
{
"type": "refactor",
"release": "patch"
},
{
"type": "test",
"release": false
}
],
"parserOpts": {
"noteKeywords": [
"BREAKING CHANGE",
"BREAKING CHANGES"
]
}
}
],
[
"@semantic-release/release-notes-generator",
{
"preset": "conventionalcommits"
}
],
[
"@semantic-release/npm",
{
"npmPublish": false
}
],
[
"@semantic-release/git",
{
"assets": [
"package.json",
"yarn.lock"
],
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
}
]
],
"branches": [
{
"name": "main"
},
{
"name": "[!main]",
"prerelease": "pr"
}
]
}
2 changes: 2 additions & 0 deletions subgraphs/etherfi-promo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@
},
"devDependencies": {
"@graphprotocol/graph-cli": "^0.80.0",
"semantic-release": "^23.1.1",
"semantic-release-monorepo": "^8.0.2",
"ts-node": "^10.9.2",
"viem": "^2.9.26"
}
Expand Down
86 changes: 86 additions & 0 deletions subgraphs/isolated-pools/.releaserc
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
{
"extends": "semantic-release-monorepo",
"plugins": [
[
"@semantic-release/commit-analyzer",
{
"preset": "conventionalcommits",
"releaseRules": [
{
"breaking": true,
"release": "major"
},
{
"type": "build",
"release": false
},
{
"type": "chore",
"release": false
},
{
"type": "docs",
"release": "patch"
},
{
"type": "ci",
"release": false
},
{
"type": "feat",
"release": "minor"
},
{
"type": "fix",
"release": "patch"
},
{
"type": "refactor",
"release": "patch"
},
{
"type": "test",
"release": false
}
],
"parserOpts": {
"noteKeywords": [
"BREAKING CHANGE",
"BREAKING CHANGES"
]
}
}
],
[
"@semantic-release/release-notes-generator",
{
"preset": "conventionalcommits"
}
],
[
"@semantic-release/npm",
{
"npmPublish": false
}
],
[
"@semantic-release/git",
{
"assets": [
"package.json",
"yarn.lock"
],
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
}
]
],
"branches": [
{
"name": "main"
},
{
"name": "[!main]",
"prerelease": "pr"
}
]
}
2 changes: 2 additions & 0 deletions subgraphs/isolated-pools/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@
"@graphprotocol/graph-cli": "^0.80.0",
"apollo-fetch": "^0.7.0",
"hardhat": "^2.10.2",
"semantic-release": "^23.1.1",
"semantic-release-monorepo": "^8.0.2",
"ts-node": "^10.9.2",
"urql": "^3.0.3",
"venus-subgraph-utils": "0.0.0"
Expand Down
Loading

0 comments on commit cc17394

Please sign in to comment.