Skip to content

Commit

Permalink
chore: use npm workspaces.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaywcjlove committed Dec 6, 2022
1 parent 17ecbd5 commit f850f53
Show file tree
Hide file tree
Showing 10 changed files with 55,896 additions and 42 deletions.
27 changes: 11 additions & 16 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ on:

jobs:
build-deploy:
runs-on: ubuntu-18.04
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 14
node-version: 16

- name: Look Changelog
uses: jaywcjlove/changelog-generator@v1.4.8
uses: jaywcjlove/changelog-generator@main
with:
token: ${{ secrets.GITHUB_TOKEN }}
filter-author: (小弟调调™|Renovate Bot)
Expand All @@ -29,14 +29,9 @@ jobs:
- run: markdown-to-html -s packages/core/README.md --output packages/core/docs/index.html
- run: markdown-to-html -s README-zh.md --output packages/core/docs/index.zh.html

- run: npm run build
working-directory: example/create-react-app

- run: npm run build
working-directory: example/build

- run: npm run build
working-directory: example/webpack
- run: npm run example:create-react-app
- run: npm run example:typescript
- run: npm run example:webpack

- name: Generate Contributors Images
uses: jaywcjlove/github-action-contributors@main
Expand All @@ -47,13 +42,13 @@ jobs:

- name: Is a tag created auto?
id: create_tag
uses: jaywcjlove/create-tag-action@v1.3.6
uses: jaywcjlove/create-tag-action@main
with:
package-path: ./packages/core/package.json

- name: get tag version
id: tag_version
uses: jaywcjlove/changelog-generator@v1.5.0
uses: jaywcjlove/changelog-generator@main

- name: Deploy
uses: peaceiris/actions-gh-pages@v3
Expand All @@ -64,7 +59,7 @@ jobs:

- name: Generate Changelog
id: changelog
uses: jaywcjlove/changelog-generator@v1.5.0
uses: jaywcjlove/changelog-generator@main
if: steps.create_tag.outputs.successful
with:
head-ref: ${{ steps.create_tag.outputs.version }}
Expand Down
2 changes: 1 addition & 1 deletion example/base/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "base",
"name": "@example/base",
"version": "1.0.0",
"description": "",
"private": true,
Expand Down
4 changes: 2 additions & 2 deletions example/create-react-app/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "create-react-app",
"name": "@example/create-react-app",
"version": "0.1.0",
"private": true,
"dependencies": {
Expand All @@ -8,7 +8,7 @@
"@testing-library/user-event": "~14.4.3",
"react": "~18.2.0",
"react-dom": "~18.2.0",
"react-scripts": "~5.0.0"
"react-scripts": "~5.0.1"
},
"devDependencies": {
"mocker-api": "2.9.5"
Expand Down
2 changes: 1 addition & 1 deletion example/express/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "express-demo",
"name": "@example/express",
"version": "1.0.0",
"description": "",
"private": true,
Expand Down
2 changes: 1 addition & 1 deletion example/loadData/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "load-data",
"name": "@example/load-data",
"version": "1.0.0",
"description": "",
"private": true,
Expand Down
2 changes: 1 addition & 1 deletion example/typescript/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "typescript",
"name": "@example/typescript",
"version": "1.0.0",
"private": true,
"description": "",
Expand Down
2 changes: 1 addition & 1 deletion example/webpack/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "webpack",
"name": "@example/webpack",
"version": "1.0.0",
"private": true,
"description": "Mocker API Example",
Expand Down
5 changes: 5 additions & 0 deletions lerna.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"version": "2.9.5",
"packages": ["packages/*", "example/*"],
"useWorkspaces": true
}
Loading

0 comments on commit f850f53

Please sign in to comment.