8000 chore(cd): setup cd to release to npm (#10) · homebaseio/homebase-react@18eedda · GitHub
[go: up one dir, main page]

Skip to content

Commit 18eedda

Browse files
chore(cd): setup cd to release to npm (#10)
1 parent ea3316e commit 18eedda

File tree

6 files changed

+4622
-73
lines changed

6 files changed

+4622
-73
lines changed

.github/workflows/cd.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: CD
2+
on:
3+
push:
4+
branches:
5+
- master
6+
jobs:
7+
release:
8+
name: Release
9+
if: "!contains(github.event.head_commit.message, 'skip cd')"
10+
runs-on: ubuntu-18.04
11+
steps:
12+
- uses: actions/checkout@v2
13+
- uses: actions/setup-node@v1
14+
with:
15+
node-version: '12'
16+
- run: yarn install --frozen-lockfile
17+
- run: yarn test
18+
- run: yarn semantic-release
19+
env:
20+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
21+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

.releaserc.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"plugins": [
3+
"@semantic-release/commit-analyzer",
4+
"@semantic-release/release-notes-generator",
5+
"@semantic-release/changelog",
6+
"@semantic-release/npm",
7+
["@semantic-release/github", {
8+
"assets": ["dist/**"]
9+
}],
10+
["@semantic-release/git", {
11+
"assets": ["dist", "package.json", "CHANGELOG.md"],
12+
"message": "chore(release): ${nextRelease.version} [skip cd]\n\n${nextRelease.notes}"
13+
}]
14+
]
15+
}

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## v0.0.1
1+
# v0.0.1
22
- React component to provide a declarative relational DB with minimal fuss.
33
- React hooks for transact, query and find one entity.
44
- Make Datascript's syntax more JS and React friendly.

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Homebase React
22

33
[![CI](https://github.com/homebaseio/homebase-react/workflows/CI/badge.svg)](https://github.com/homebaseio/homebase-react/actions?query=workflow%3ACI)
4+
[![CD](https://github.com/homebaseio/homebase-react/workflows/CD/badge.svg)](https://github.com/homebaseio/homebase-react/actions?query=workflow%3ACD)
45
[![NPM Version](https://img.shields.io/npm/v/homebase-react)](https://www.npmjs.com/package/homebase-react)
56
[![Bundle Size](https://img.shields.io/bundlephobia/minzip/homebase-react)](https://www.npmjs.com/package/homebase-react)
67
[![License](https://img.shields.io/github/license/homebaseio/homebase-react.svg)](LICENSE)

package.json

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "homebase-react",
33
"description": "A graph database for React.",
4-
"version": "0.0.1",
4+
"version": "0.0.0-development",
55
"license": "MIT",
66
"homepage": "https://github.com/homebaseio/homebase-react",
77
"main": "./dist/js/homebase.react.js",
@@ -14,25 +14,35 @@
1414
"test:cljs": "shadow-cljs compile test && node out/node-tests.js",
1515
"test": "yarn test:cljs && yarn test:js",
1616
"test:dev": "yarn test:cljs && yarn test:js:dev",
17-
"report": "rm -rf dist && shadow-cljs run shadow.cljs.build-report npm report.html"
17+
"report": "rm -rf dist && shadow-cljs run shadow.cljs.build-report npm report.html",
18+
"semantic-release": "semantic-release"
1819
},
19-
"dependencies": {
20-
"react": "16.14.0"
20+
"peerDependencies": {
21+
"react": ">=16.8.0"
2122
},
2223
"devDependencies": {
2324
"@babel/cli": "7.11.6",
2425
"@babel/core": "7.11.6",
2526
"@babel/plugin-transform-modules-commonjs": "7.12.1",
2627
"@babel/plugin-transform-react-jsx": "7.10.4",
28+
"@semantic-release/changelog": "^5.0.1",
29+
"@semantic-release/commit-analyzer": "^8.0.1",
30+
"@semantic-release/git": "^9.0.0",
31+
"@semantic-release/github": "^7.1.1",
32+
"@semantic-release/npm": "^7.0.6",
33+
"@semantic-release/release-notes-generator": "^9.0.1",
2734
"babel-runtime": "6.26.0",
2835
"create-react-class": "15.6.3",
2936
"enzyme": "3.11.0",
3037
"enzyme-adapter-react-16": "1.15.5",
3138
"highlight.js": "10.2.1",
3239
"jest": "26.6.0",
3340
"marked": "1.2.0",
41+
"react": "16.14.0",
3442
"react-component-benchmark": "0.0.4",
3543
"react-dom": "16.14.0",
44+
"semantic-release": "^17.2.2",
45+
"semantic-release-cli": "^5.4.0",
3646
"shadow-cljs": "2.11.4"
3747
},
3848
"keywords": [
@@ -45,13 +55,14 @@
4555
],
4656
"repository": {
4757
"type": "git",
48-
"url": "git+https://github.com/homebaseio/homebase-react.git"
58+
"url": "https://github.com/homebaseio/homebase-react.git"
4959
},
5060
"bugs": {
5161
"url": "https://github.com/homebaseio/homebase-react/issues"
5262
},
5363
"publishConfig": {
54-
"registry": "https://npm.pkg.github.com/"
64+
"access": "public",
65+
"registry": "https://registry.npmjs.org/"
5566
},
5667
"author": "Chris Smothers <chris@homebase.io> (https://homebase.io)",
5768
"contributors": [

0 commit comments

Comments
 (0)
0