Skip to content

Commit

Permalink
Setup semantic release
Browse files Browse the repository at this point in the history
  • Loading branch information
bb441db committed May 29, 2024
1 parent 27a6264 commit 9e7e080
Show file tree
Hide file tree
Showing 5 changed files with 3,511 additions and 127 deletions.
5 changes: 5 additions & 0 deletions .commitlintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"extends": [
"@commitlint/config-conventional"
]
}
23 changes: 23 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Release

on:
push:
branches:
- master
- feature/tuya-sdk-upgrade

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18
cache: 'yarn'
- run: yarn install --frozen-lockfile
- run: yarn build
- env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: yarn semantic-release
26 changes: 26 additions & 0 deletions .releaserc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"branches": [
"master",
{
"name": "feature/tuya-sdk-upgrade",
"prerelease": "RC"
}
],
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
"@semantic-release/github",
"@semantic-release/npm",
[
"@semantic-release/git",
{
"assets": [
"docs",
"package.json"
],
"message": "chore(release): ${nextRelease.version} [skip ci]"
}
]
],
"tagFormat": "${version}"
}
23 changes: 20 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
"build": "tsdx build",
"test": "tsdx test",
"lint": "tsdx lint",
"prepare": "tsdx build"
"commit": "cz",
"prepare": "husky install"
},
"peerDependencies": {
"react-native": ">=0.61.5"
Expand All @@ -43,10 +44,26 @@
"@types/jest": "^25.1.2",
"@types/react-native": "^0.61.16",
"@volst/eslint-config": "^4.1.1",
"husky": "^4.2.3",
"react-native": "^0.61.5",
"tsdx": "^0.12.3",
"tslib": "^1.10.0",
"typescript": "^3.7.5"
"typescript": "^3.7.5",
"@commitlint/cli": "^18.1.0",
"@commitlint/config-conventional": "^18.1.0",
"@semantic-release/commit-analyzer": "^11.0.0",
"@semantic-release/exec": "^6.0.3",
"@semantic-release/git": "^10.0.1",
"@semantic-release/npm": "^11.0.0",
"commitizen": "^4.3.0",
"commitlint": "^18.1.0",
"conventional-changelog-conventionalcommits": "^7.0.2",
"cz-conventional-changelog": "^3.3.0",
"husky": "^8.0.3",
"semantic-release": "^22.0.5"
},
"config": {
"commitizen": {
"path": "./node_modules/cz-conventional-changelog"
}
}
}
Loading

0 comments on commit 9e7e080

Please sign in to comment.