Skip to content

Commit cdf25f2

Browse files
authored
feat: move to npm org and use semantic release (#294)
Signed-off-by: David van der Spek <vanderspek.david@gmail.com>
1 parent e5979ac commit cdf25f2

File tree

7 files changed

+111
-122
lines changed

7 files changed

+111
-122
lines changed

.github/workflows/cd.yml

+19-12
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,23 @@ jobs:
2323
publish:
2424
name: Publish
2525
runs-on: ubuntu-latest
26-
concurrency:
27-
group: ${{ github.workflow }}-${{ github.ref }}
28-
cancel-in-progress: true
2926
steps:
30-
- uses: actions/checkout@v3
31-
- uses: actions/setup-node@v3
32-
with:
33-
node-version: 16.15.0
34-
- run: yarn --immutable
35-
- run: yarn clean && yarn build
36-
- uses: JS-DevTools/npm-publish@v1
37-
with:
38-
token: ${{ secrets.NPM_TOKEN }}
27+
- name: 'Checkout'
28+
uses: actions/checkout@v3
29+
with:
30+
fetch-depth: 0
31+
token: ${{ secrets.PLURAL_BOT_PAT }}
32+
- name: 'Setup Node'
33+
uses: actions/setup-node@v3
34+
with:
35+
node-version: 16
36+
registry-url: 'https://registry.npmjs.org'
37+
- name: 'Install Dependencies'
38+
run: yarn install --immutable
39+
- name: 'Clean & Build'
40+
run: yarn clean && yarn build
41+
- name: Semantic Release
42+
uses: cycjimmy/semantic-release-action@v3
43+
env:
44+
GITHUB_TOKEN: ${{ secrets.PLURAL_BOT_PAT }}
45+
NODE_AUTH_TOKEN: ${{ secrets.PLURAL_BOT_NPM_TOKEN }}

.github/workflows/ci.yml

-17
Original file line numberDiff line numberDiff line change
@@ -5,23 +5,6 @@ on:
55
- main
66

77
jobs:
8-
version:
9-
name: Check version
10-
runs-on: ubuntu-latest
11-
steps:
12-
- uses: actions/checkout@v3
13-
- uses: actions/setup-node@v3
14-
with:
15-
node-version: 16.15.0
16-
- uses: flood-io/is-published-on-npm@v1
17-
id: check
18-
- run: |
19-
echo "Local version from package.json is ${{ steps.check.outputs.version }}"
20-
echo "Published version from npm registry is $(npm view . version)"
21-
- if: ${{ steps.check.outputs.published == 'true' }}
22-
run: |
23-
echo "This version is already published, update local version to be bigger than published one"
24-
exit 1
258
build:
269
name: Build
2710
runs-on: ubuntu-latest

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,20 @@
44

55
## Installation
66

7-
`npm i -S pluralsh-design-system`
7+
`npm i -S @pluralsh/design-system`
88

99
## Usage
1010

1111
```jsx
12-
Import { Alert } from 'pluralsh-design-system'
12+
Import { Alert } from '@pluralsh/design-system'
1313

1414
// ...
1515
return (
1616
<Alert
1717
severy="success"
1818
title="Wouhou!"
1919
>
20-
You installed pluralsh-design-system correcly
20+
You installed @pluralsh/design-system correcly
2121
</Alert>
2222
)
2323
```

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"name": "pluralsh-design-system",
3-
"version": "1.289.0",
2+
"name": "@pluralsh/design-system",
3+
"version": "0.1.0",
44
"description": "Pluralsh Design System",
55
"main": "dist/index.js",
66
"files": [

renovate.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,7 @@
3333
"platformAutomerge": true
3434
},
3535
{
36-
"matchManagers": ["npm"],
37-
"bumpVersion": "minor"
36+
"matchManagers": ["npm"]
3837
}
3938
],
4039
"separateMinorPatch": true

src/stories/Codeline.stories.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,5 @@ function Template(args: any) {
2929
export const Default = Template.bind({})
3030

3131
Default.args = {
32-
children: 'npm i pluralsh-design-system',
32+
children: 'npm i @pluralsh/design-system',
3333
}

yarn.lock

+85-85
Original file line numberDiff line numberDiff line change
@@ -3336,6 +3336,91 @@ __metadata:
33363336
languageName: node
33373337
linkType: hard
33383338

3339+
"@pluralsh/design-system@workspace:.":
3340+
version: 0.0.0-use.local
3341+
resolution: "@pluralsh/design-system@workspace:."
3342+
dependencies:
3343+
"@babel/core": 7.20.2
3344+
"@babel/preset-env": 7.20.2
3345+
"@babel/preset-react": 7.18.6
3346+
"@emotion/react": 11.10.5
3347+
"@emotion/styled": 11.10.5
3348+
"@floating-ui/react-dom-interactions": 0.10.3
3349+
"@pluralsh/eslint-config-typescript": 2.4.2
3350+
"@react-aria/button": 3.6.2
3351+
"@react-aria/checkbox": 3.6.0
3352+
"@react-aria/combobox": 3.4.2
3353+
"@react-aria/focus": 3.9.0
3354+
"@react-aria/interactions": 3.12.0
3355+
"@react-aria/listbox": 3.7.0
3356+
"@react-aria/overlays": 3.11.0
3357+
"@react-aria/radio": 3.4.0
3358+
"@react-aria/select": 3.8.2
3359+
"@react-aria/tabs": 3.3.2
3360+
"@react-aria/utils": 3.14.0
3361+
"@react-aria/visually-hidden": 3.5.0
3362+
"@react-stately/collections": 3.4.4
3363+
"@react-stately/combobox": 3.2.2
3364+
"@react-stately/overlays": 3.4.2
3365+
"@react-stately/radio": 3.6.0
3366+
"@react-stately/tabs": 3.2.2
3367+
"@react-stately/toggle": 3.4.2
3368+
"@react-types/shared": 3.15.0
3369+
"@storybook/addon-actions": 6.5.13
3370+
"@storybook/addon-docs": 6.5.13
3371+
"@storybook/addon-essentials": 6.5.13
3372+
"@storybook/addon-interactions": 6.5.13
3373+
"@storybook/addon-links": 6.5.13
3374+
"@storybook/builder-webpack5": 6.5.13
3375+
"@storybook/manager-webpack5": 6.5.13
3376+
"@storybook/node-logger": 6.5.13
3377+
"@storybook/preset-create-react-app": 4.1.2
3378+
"@storybook/react": 6.5.13
3379+
"@storybook/testing-library": 0.0.13
3380+
"@tanstack/react-table": 8.5.27
3381+
"@types/chroma-js": 2.1.4
3382+
"@types/react-transition-group": 4.4.5
3383+
"@types/styled-components": 5.1.26
3384+
"@typescript-eslint/eslint-plugin": 5.43.0
3385+
"@typescript-eslint/parser": 5.43.0
3386+
babel-loader: 9.1.0
3387+
chroma-js: 2.4.2
3388+
classnames: 2.3.2
3389+
eslint: 8.27.0
3390+
eslint-plugin-storybook: 0.6.7
3391+
fuse.js: 6.6.2
3392+
grommet: 2.27.0
3393+
grommet-icons: 4.8.0
3394+
highlight.js: 11.6.0
3395+
honorable: 0.148.0
3396+
honorable-theme-default: 0.66.0
3397+
prop-types: 15.8.1
3398+
react: 18.2.0
3399+
react-animate-height: 3.0.5
3400+
react-dom: 18.2.0
3401+
react-markdown: 8.0.3
3402+
react-merge-refs: 2.0.1
3403+
react-router-dom: 6.4.3
3404+
react-scripts: 5.0.1
3405+
react-spring: 9.5.5
3406+
react-transition-group: 4.4.5
3407+
rehype-raw: 6.1.1
3408+
resize-observer-polyfill: 1.5.1
3409+
rimraf: 3.0.2
3410+
styled-components: 5.3.6
3411+
typescript: 4.8.4
3412+
peerDependencies:
3413+
"@emotion/react": ">=11.9.3"
3414+
"@emotion/styled": ">=11.9.3"
3415+
honorable: ">=0.128.0"
3416+
honorable-theme-default: ">=0.63.0"
3417+
react: ">=16.0.0"
3418+
react-dom: ">=16.0.0"
3419+
react-transition-group: ">=4.4.2"
3420+
styled-components: ">=5.3.5"
3421+
languageName: unknown
3422+
linkType: soft
3423+
33393424
"@pluralsh/eslint-config-pluralsh@npm:^1.3.1":
33403425
version: 1.3.2
33413426
resolution: "@pluralsh/eslint-config-pluralsh@npm:1.3.2"
@@ -17291,91 +17376,6 @@ __metadata:
1729117376
languageName: node
1729217377
linkType: hard
1729317378

17294-
"pluralsh-design-system@workspace:.":
17295-
version: 0.0.0-use.local
17296-
resolution: "pluralsh-design-system@workspace:."
17297-
dependencies:
17298-
"@babel/core": 7.20.2
17299-
"@babel/preset-env": 7.20.2
17300-
"@babel/preset-react": 7.18.6
17301-
"@emotion/react": 11.10.5
17302-
"@emotion/styled": 11.10.5
17303-
"@floating-ui/react-dom-interactions": 0.10.3
17304-
"@pluralsh/eslint-config-typescript": 2.4.2
17305-
"@react-aria/button": 3.6.2
17306-
"@react-aria/checkbox": 3.6.0
17307-
"@react-aria/combobox": 3.4.2
17308-
"@react-aria/focus": 3.9.0
17309-
"@react-aria/interactions": 3.12.0
17310-
"@react-aria/listbox": 3.7.0
17311-
"@react-aria/overlays": 3.11.0
17312-
"@react-aria/radio": 3.4.0
17313-
"@react-aria/select": 3.8.2
17314-
"@react-aria/tabs": 3.3.2
17315-
"@react-aria/utils": 3.14.0
17316-
"@react-aria/visually-hidden": 3.5.0
17317-
"@react-stately/collections": 3.4.4
17318-
"@react-stately/combobox": 3.2.2
17319-
"@react-stately/overlays": 3.4.2
17320-
"@react-stately/radio": 3.6.0
17321-
"@react-stately/tabs": 3.2.2
17322-
"@react-stately/toggle": 3.4.2
17323-
"@react-types/shared": 3.15.0
17324-
"@storybook/addon-actions": 6.5.13
17325-
"@storybook/addon-docs": 6.5.13
17326-
"@storybook/addon-essentials": 6.5.13
17327-
"@storybook/addon-interactions": 6.5.13
17328-
"@storybook/addon-links": 6.5.13
17329-
"@storybook/builder-webpack5": 6.5.13
17330-
"@storybook/manager-webpack5": 6.5.13
17331-
"@storybook/node-logger": 6.5.13
17332-
"@storybook/preset-create-react-app": 4.1.2
17333-
"@storybook/react": 6.5.13
17334-
"@storybook/testing-library": 0.0.13
17335-
"@tanstack/react-table": 8.5.27
17336-
"@types/chroma-js": 2.1.4
17337-
"@types/react-transition-group": 4.4.5
17338-
"@types/styled-components": 5.1.26
17339-
"@typescript-eslint/eslint-plugin": 5.43.0
17340-
"@typescript-eslint/parser": 5.43.0
17341-
babel-loader: 9.1.0
17342-
chroma-js: 2.4.2
17343-
classnames: 2.3.2
17344-
eslint: 8.27.0
17345-
eslint-plugin-storybook: 0.6.7
17346-
fuse.js: 6.6.2
17347-
grommet: 2.27.0
17348-
grommet-icons: 4.8.0
17349-
highlight.js: 11.6.0
17350-
honorable: 0.148.0
17351-
honorable-theme-default: 0.66.0
17352-
prop-types: 15.8.1
17353-
react: 18.2.0
17354-
react-animate-height: 3.0.5
17355-
react-dom: 18.2.0
17356-
react-markdown: 8.0.3
17357-
react-merge-refs: 2.0.1
17358-
react-router-dom: 6.4.3
17359-
react-scripts: 5.0.1
17360-
react-spring: 9.5.5
17361-
react-transition-group: 4.4.5
17362-
rehype-raw: 6.1.1
17363-
resize-observer-polyfill: 1.5.1
17364-
rimraf: 3.0.2
17365-
styled-components: 5.3.6
17366-
typescript: 4.8.4
17367-
peerDependencies:
17368-
"@emotion/react": ">=11.9.3"
17369-
"@emotion/styled": ">=11.9.3"
17370-
honorable: ">=0.128.0"
17371-
honorable-theme-default: ">=0.63.0"
17372-
react: ">=16.0.0"
17373-
react-dom: ">=16.0.0"
17374-
react-transition-group: ">=4.4.2"
17375-
styled-components: ">=5.3.5"
17376-
languageName: unknown
17377-
linkType: soft
17378-
1737917379
"pnp-webpack-plugin@npm:1.6.4":
1738017380
version: 1.6.4
1738117381
resolution: "pnp-webpack-plugin@npm:1.6.4"

0 commit comments

Comments
 (0)