-
Notifications
You must be signed in to change notification settings - Fork 170
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #321 from VenusProtocol/add-semantic-release-to-main
Add semantic release to main
- Loading branch information
Showing
7 changed files
with
3,196 additions
and
85 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- develop | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
persist-credentials: false | ||
|
||
- uses: actions/setup-node@v2 | ||
with: | ||
cache: "yarn" | ||
|
||
- name: Install dependencies | ||
# Hack to get around failing "ethereumjs-abi The remote archive doesn't match the expected checksum" error | ||
run: YARN_CHECKSUM_BEHAVIOR=update yarn | ||
|
||
- name: Compile types | ||
run: yarn hardhat typechain | ||
|
||
- name: Build | ||
run: yarn build | ||
|
||
- name: Release | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.VENUS_TOOLS_TOKEN }} | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
GIT_AUTHOR_NAME: Venus Tools | ||
GIT_AUTHOR_EMAIL: [email protected] | ||
GIT_COMMITTER_NAME: Venus Tools | ||
GIT_COMMITTER_EMAIL: [email protected] | ||
run: yarn semantic-release |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/bin/sh | ||
. "$(dirname "$0")/_/husky.sh" | ||
|
||
npx --no -- commitlint --edit ${1} --config ./commitlint.config.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
{ | ||
"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/changelog", | ||
{ | ||
"changelogFile": "CHANGELOG.md" | ||
} | ||
], | ||
[ | ||
"@semantic-release/npm", | ||
{ | ||
"npmPublish": true | ||
} | ||
], | ||
[ | ||
"@semantic-release/git", | ||
{ | ||
"assets": [ | ||
"package.json", | ||
"CHANGELOG.md" | ||
], | ||
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}" | ||
} | ||
] | ||
], | ||
"branches": [ | ||
{ | ||
"name": "main" | ||
}, | ||
{ | ||
"name": "develop", | ||
"prerelease": "dev" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"]], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,28 +2,29 @@ | |
"name": "@venusprotocol/venus-protocol", | ||
"version": "0.7.0", | ||
"description": "The Venus Money Market", | ||
"repository": "[email protected]:VenusProtocol/venus-protocol.git", | ||
"author": "Venus", | ||
"license": "BSD-3-Clause", | ||
"files": [ | ||
"artifacts", | ||
"networks", | ||
"deploy", | ||
"contracts" | ||
"dist", | ||
"contracts", | ||
"deployments" | ||
], | ||
"scripts": { | ||
"compile": "hardhat compile", | ||
"test": "hardhat test", | ||
"build": "rm -rf dist && tsc --declaration && hardhat compile && cp -r ./{package.json,yarn.lock,artifacts,contracts,networks} dist/", | ||
"publish:dist": "yarn build && cd dist && yarn publish --access public", | ||
"build": "rm -rf dist && tsc --declaration && hardhat compile", | ||
"lint": "yarn lint:ts && yarn lint:sol && yarn prettier:check", | ||
"lint:ts": "eslint --config ./.eslintrc.yaml --ignore-path ./.eslintignore --ext .js,.ts .", | ||
"lint:ts": "eslint --ignore-path ./.eslintignore --ext .js,.ts .", | ||
"lint:sol": "solhint \"contracts/**/*.sol\"", | ||
"lint:sol:fix": "prettier --write \"contracts/**/*.sol\"", | ||
"prettier": "prettier --config ./.prettierrc.yaml --write \"**/*.{js,json,md,ts,yaml,yml,sol}\"", | ||
"prettier:check": "prettier --check --config ./.prettierrc.yaml \"**/*.{js,json,md,ts,yaml,yml,sol}\"", | ||
"docgen": "hardhat docgen" | ||
"prettier": "prettier --write \"**/*.{js,json,md,ts,yaml,yml,sol}\"", | ||
"prettier:check": "prettier --check \"**/*.{js,json,md,ts,yaml,yml,sol}\"", | ||
"docgen": "hardhat docgen", | ||
"prepare": "husky install" | ||
}, | ||
"repository": "[email protected]:VenusProtocol/venus-protocol.git", | ||
"author": "Venus", | ||
"license": "BSD-3-Clause", | ||
"dependencies": { | ||
"@openzeppelin/contracts-upgradeable": "^4.8.0", | ||
"dotenv": "^16.0.1" | ||
|
@@ -32,6 +33,8 @@ | |
"hardhat": "^2.10.1" | ||
}, | ||
"devDependencies": { | ||
"@commitlint/cli": "^17.0.3", | ||
"@commitlint/config-conventional": "^17.0.3", | ||
"@defi-wonderland/smock": "^2.2.0", | ||
"@ethersproject/abi": "^5.6.4", | ||
"@ethersproject/abstract-provider": "^5", | ||
|
@@ -41,9 +44,11 @@ | |
"@nomicfoundation/hardhat-chai-matchers": "^1.0.2", | ||
"@nomicfoundation/hardhat-network-helpers": "^1.0.4", | ||
"@nomicfoundation/hardhat-toolbox": "^1.0.2", | ||
"@nomiclabs/hardhat-ethers": "npm:hardhat-deploy-ethers", | ||
"@nomiclabs/hardhat-etherscan": "^3.1.0", | ||
"@openzeppelin/hardhat-upgrades": "^1.21.0", | ||
"@semantic-release/changelog": "^6.0.1", | ||
"@semantic-release/git": "^10.0.1", | ||
"@semantic-release/npm": "^9.0.1", | ||
"@trivago/prettier-plugin-sort-imports": "^3.3.1", | ||
"@typechain/ethers-v5": "^10.1.0", | ||
"@typechain/hardhat": "^6.1.2", | ||
|
@@ -61,14 +66,21 @@ | |
"hardhat": "^2.10.1", | ||
"hardhat-deploy": "^0.11.14", | ||
"hardhat-gas-reporter": "^1.0.8", | ||
"husky": "^8.0.1", | ||
"prettier": "^2.7.1", | ||
"prettier-plugin-solidity": "^1.0.0-beta.24", | ||
"semantic-release": "^19.0.3", | ||
"solhint": "^3.3.7", | ||
"solidity-coverage": "^0.7.21", | ||
"solidity-docgen": "^0.6.0-beta.30", | ||
"ts-node": "^10.9.1", | ||
"typechain": "^8.1.0", | ||
"typescript": "^4.7.4", | ||
"web3-utils": "^1.7.5" | ||
}, | ||
"packageManager": "[email protected]", | ||
"publishConfig": { | ||
"access": "public", | ||
"provenance": true | ||
} | ||
} | ||
} |
Oops, something went wrong.