Skip to content

Commit

Permalink
feat: add semantic release and cz
Browse files Browse the repository at this point in the history
  • Loading branch information
ialexanderbrito committed May 23, 2022
1 parent 7547aa1 commit ba54ca8
Show file tree
Hide file tree
Showing 5 changed files with 2,441 additions and 445 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Semantic Release

on:
push:
branches:
- master
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup Node.js
uses: actions/setup-node@v1
with:
node-version: 14
- name: Install dependencies
run: npm install
- name: Build app
run: npm run build
- name: Semantic Release
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
run: npx semantic-release
19 changes: 19 additions & 0 deletions .releaserc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
"@semantic-release/github",
"@semantic-release/changelog",
[
"@semantic-release/npm",
{
"npmPublish": false
}
],
{
"path": "@semantic-release/git",
"assets": ["package.json", "package-lock.json", "CHANGELOG.md"],
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
}
]
}
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
include .env

release:
GITHUB_TOKEN=${GH_TOKEN} npm run release
31 changes: 19 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,15 @@
"test": "react-scripts test",
"eject": "react-scripts eject",
"dev": "react-scripts start",
"lint": "eslint src/ --fix"
"lint": "eslint src/ --fix",
"commit": "cz",
"release": "semantic-release --no-ci"
},
"eslintConfig": {
"extends": [
"react-app",
"react-app/jest"
]
},
"dependencies": {
"@emotion/react": "^11.9.0",
Expand Down Expand Up @@ -57,15 +65,9 @@
"last 1 safari version"
]
},
"lint-staged": {
"*.ts(x)": [
"prettier --write",
"eslint src/ --fix"
]
},
"devDependencies": {
"@commitlint/cli": "^16.2.3",
"@commitlint/config-conventional": "^16.2.1",
"@semantic-release/changelog": "^5.0.1",
"@semantic-release/git": "^9.0.0",
"@types/react-dom": "^18.0.1",
"@types/react-dropzone": "^5.1.0",
"@types/react-modal": "^3.13.1",
Expand All @@ -79,10 +81,15 @@
"eslint-plugin-import-helpers": "^1.2.1",
"eslint-plugin-prettier": "^4.0.0",
"eslint-plugin-react": "^7.29.4",
"husky": "^7.0.4",
"lint-staged": "^12.3.7",
"prettier": "^2.6.2",
"prettier-eslint": "^13.0.0",
"prettier-eslint-cli": "^5.0.1"
"prettier-eslint-cli": "^5.0.1",
"cz-conventional-changelog": "3.3.0",
"semantic-release": "^17.2.4"
},
"config": {
"commitizen": {
"path": "./node_modules/cz-conventional-changelog"
}
}
}
Loading

0 comments on commit ba54ca8

Please sign in to comment.