Skip to content

Commit 68ac73b

Browse files
committed
docs: added semantic-release
moved to semantic-release
1 parent 346cf07 commit 68ac73b

File tree

5 files changed

+2395
-615
lines changed

5 files changed

+2395
-615
lines changed

.changeset/README.md

Lines changed: 0 additions & 8 deletions
This file was deleted.

.changeset/config.json

Lines changed: 0 additions & 10 deletions
This file was deleted.

.github/workflows/release.yml

Lines changed: 26 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,40 @@
1-
name: Release
1+
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
2+
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
3+
4+
name: Node.js CI
25

36
on:
47
push:
5-
branches:
6-
- main
8+
branches: [main]
9+
pull_request:
10+
branches: [main]
711

812
jobs:
9-
release:
10-
name: Release
13+
build:
1114
runs-on: ubuntu-latest
15+
16+
strategy:
17+
matrix:
18+
node-version: [12.x, 14.x]
19+
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
20+
1221
steps:
13-
- name: Checkout Repo
14-
uses: actions/checkout@master
15-
with:
16-
# This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits
17-
fetch-depth: 0
22+
- name: Checkout repo
23+
uses: actions/checkout@v2
1824

19-
- name: Setup Node.js 12.x
20-
uses: actions/setup-node@master
25+
- name: Use Node ${{ matrix.node }}
26+
uses: actions/setup-node@v1
2127
with:
22-
node-version: 12.x
28+
node-version: ${{ matrix.node }}
2329

24-
- name: Install Dependencies
25-
run: yarn
30+
- name: Install deps and build (with cache)
31+
uses: bahmutov/npm-install@v1
2632

27-
- name: Create Release Pull Request or Publish to npm
28-
id: changesets
29-
uses: changesets/action@master
30-
with:
31-
# This expects you to have a script called release which does a build for your packages and calls changeset publish
32-
publish: yarn release
33+
- name: Build
34+
run: yarn build
35+
36+
- name: Release
37+
run: yarn release
3338
env:
3439
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3540
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

package.json

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-simple-typewriter",
3-
"version": "2.0.5",
3+
"version": "0.0.0-development",
44
"description": "A simple react component for adding a nice typewriter effect to your project.",
55
"author": "awran5 <[email protected]>",
66
"license": "MIT",
@@ -25,14 +25,14 @@
2525
"test:watch": "react-scripts test --env=jsdom",
2626
"predeploy": "cd example && yarn && yarn run build",
2727
"deploy": "gh-pages -d example/build",
28-
"release": "changeset publish"
28+
"commit": "git cz",
29+
"release": "semantic-release -b main"
2930
},
3031
"peerDependencies": {
3132
"react": ">=16.8.0",
3233
"react-dom": ">=16.8.0"
3334
},
3435
"devDependencies": {
35-
"@changesets/cli": "^2.16.0",
3636
"@rollup/plugin-commonjs": "^19.0.0",
3737
"@rollup/plugin-node-resolve": "^13.0.0",
3838
"@testing-library/jest-dom": "^5.14.1",
@@ -45,7 +45,9 @@
4545
"@typescript-eslint/eslint-plugin": "^4.28.1",
4646
"@typescript-eslint/parser": "^4.28.1",
4747
"autoprefixer": "^10.2.6",
48+
"commitizen": "^4.2.4",
4849
"cross-env": "^7.0.3",
50+
"cz-conventional-changelog": "^3.3.0",
4951
"eslint": "^7.29.0",
5052
"eslint-config-airbnb": "^18.2.1",
5153
"eslint-config-prettier": "^8.3.0",
@@ -66,6 +68,7 @@
6668
"rollup-plugin-postcss": "^4.0.0",
6769
"rollup-plugin-terser": "^7.0.2",
6870
"rollup-plugin-typescript2": "^0.30.0",
71+
"semantic-release": "^17.4.4",
6972
"typescript": "^4.3.5"
7073
},
7174
"keywords": [
@@ -86,5 +89,10 @@
8689
],
8790
"dependencies": {
8891
"-": "^0.0.1"
92+
},
93+
"config": {
94+
"commitizen": {
95+
"path": "cz-conventional-changelog"
96+
}
8997
}
9098
}

0 commit comments

Comments
 (0)