Skip to content
This repository has been archived by the owner on Jan 9, 2023. It is now read-only.

Commit

Permalink
feat(release): add release automation
Browse files Browse the repository at this point in the history
add husky precommit and semanti release automation

fix #42 #43
  • Loading branch information
matteovivona committed Jul 2, 2020
1 parent 4bd2a22 commit 3e0a80e
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 14 deletions.
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
jobs:
release:
name: Release
runs-on: ubuntu-18.04
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Setup Node.js
uses: actions/setup-node@v1
with:
node-version: 12
- name: Install dependencies
run: npm install
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.BOT_PAT }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npx semantic-release
34 changes: 20 additions & 14 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@hospitalrun/core",
"version": "1.0.0",
"version": "0.1.0",
"description": "Shared Interfaces and Models",
"main": "./dist/index.js",
"types": "./typings/index.d.ts",
Expand All @@ -18,6 +18,8 @@
"clean": "rimraf dist",
"update": "npx npm-check -u",
"prepare": "npm run build",
"lint-staged": "lint-staged",
"commitlint": "commitlint",
"semantic-release": "semantic-release"
},
"repository": {
Expand All @@ -32,21 +34,19 @@
"homepage": "https://github.com/HospitalRun/hospitalrun-core#readme",
"devDependencies": {
"@commitlint/cli": "~9.0.1",
"@commitlint/config-conventional": "^9.0.1",
"@commitlint/core": "~9.0.1",
"@commitlint/config-conventional": "~9.0.1",
"@commitlint/prompt": "~9.0.1",
"@hospitalrun/cli": "~0.4.4",
"@semantic-release/changelog": "^5.0.0",
"@semantic-release/changelog": "~5.0.1",
"@semantic-release/commit-analyzer": "~8.0.1",
"@semantic-release/git": "^9.0.0",
"@semantic-release/github": "^7.0.7",
"@semantic-release/release-notes-generator": "^9.0.0",
"@semantic-release/git": "~9.0.0",
"@semantic-release/github": "~7.0.7",
"@semantic-release/release-notes-generator": "~9.0.1",
"@types/pouchdb": "~6.4.0",
"@typescript-eslint/eslint-plugin": "^3.5.0",
"@typescript-eslint/parser": "~3.5.0",
"commitizen": "^4.0.3",
"commitlint-config-cz": "^0.13.0",
"cz-conventional-changelog": "^3.0.2",
"@typescript-eslint/parser": "^3.5.0",
"commitizen": "~4.1.2",
"commitlint-config-cz": "~0.13.0",
"cz-conventional-changelog": "~3.2.0",
"dateformat": "~3.0.3",
"eslint": "~7.3.1",
"eslint-config-airbnb": "~18.2.0",
Expand All @@ -57,17 +57,23 @@
"eslint-plugin-prettier": "^3.1.2",
"eslint-plugin-react": "~7.20.0",
"husky": "~4.2.0",
"lint-staged": "~10.2.0",
"pouchdb": "^7.1.1",
"prettier": "^2.0.2",
"semantic-release": "^17.0.4",
"typescript": "~3.9.5"
},
"husky": {
"hooks": {
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS",
"pre-commit": "npm test"
"commit-msg": "npm run commitlint -- -E HUSKY_GIT_PARAMS",
"pre-commit": "npm run lint-staged"
}
},
"lint-staged": {
"**/*.{js,jsx,ts,tsx}": [
"npm run lint"
]
},
"config": {
"commitizen": {
"path": "./node_modules/cz-conventional-changelog"
Expand Down
1 change: 1 addition & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"strict": true,
"esModuleInterop": true,
"declaration": true,
"skipLibCheck": true,
"sourceMap": false,
"removeComments": true,
"newLine": "lf",
Expand Down

0 comments on commit 3e0a80e

Please # to comment.