Skip to content

Commit

Permalink
feat: move to npm org and use semantic release (#294)
Browse files Browse the repository at this point in the history
Signed-off-by: David van der Spek <[email protected]>
  • Loading branch information
davidspek authored Nov 15, 2022
1 parent e5979ac commit cdf25f2
Show file tree
Hide file tree
Showing 7 changed files with 111 additions and 122 deletions.
31 changes: 19 additions & 12 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,23 @@ jobs:
publish:
name: Publish
runs-on: ubuntu-latest
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16.15.0
- run: yarn --immutable
- run: yarn clean && yarn build
- uses: JS-DevTools/npm-publish@v1
with:
token: ${{ secrets.NPM_TOKEN }}
- name: 'Checkout'
uses: actions/checkout@v3
with:
fetch-depth: 0
token: ${{ secrets.PLURAL_BOT_PAT }}
- name: 'Setup Node'
uses: actions/setup-node@v3
with:
node-version: 16
registry-url: 'https://registry.npmjs.org'
- name: 'Install Dependencies'
run: yarn install --immutable
- name: 'Clean & Build'
run: yarn clean && yarn build
- name: Semantic Release
uses: cycjimmy/semantic-release-action@v3
env:
GITHUB_TOKEN: ${{ secrets.PLURAL_BOT_PAT }}
NODE_AUTH_TOKEN: ${{ secrets.PLURAL_BOT_NPM_TOKEN }}
17 changes: 0 additions & 17 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,6 @@ on:
- main

jobs:
version:
name: Check version
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16.15.0
- uses: flood-io/is-published-on-npm@v1
id: check
- run: |
echo "Local version from package.json is ${{ steps.check.outputs.version }}"
echo "Published version from npm registry is $(npm view . version)"
- if: ${{ steps.check.outputs.published == 'true' }}
run: |
echo "This version is already published, update local version to be bigger than published one"
exit 1
build:
name: Build
runs-on: ubuntu-latest
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,20 @@

## Installation

`npm i -S pluralsh-design-system`
`npm i -S @pluralsh/design-system`

## Usage

```jsx
Import { Alert } from 'pluralsh-design-system'
Import { Alert } from '@pluralsh/design-system'

// ...
return (
<Alert
severy="success"
title="Wouhou!"
>
You installed pluralsh-design-system correcly
You installed @pluralsh/design-system correcly
</Alert>
)
```
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "pluralsh-design-system",
"version": "1.289.0",
"name": "@pluralsh/design-system",
"version": "0.1.0",
"description": "Pluralsh Design System",
"main": "dist/index.js",
"files": [
Expand Down
3 changes: 1 addition & 2 deletions renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@
"platformAutomerge": true
},
{
"matchManagers": ["npm"],
"bumpVersion": "minor"
"matchManagers": ["npm"]
}
],
"separateMinorPatch": true
Expand Down
2 changes: 1 addition & 1 deletion src/stories/Codeline.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,5 @@ function Template(args: any) {
export const Default = Template.bind({})

Default.args = {
children: 'npm i pluralsh-design-system',
children: 'npm i @pluralsh/design-system',
}
170 changes: 85 additions & 85 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3336,6 +3336,91 @@ __metadata:
languageName: node
linkType: hard

"@pluralsh/design-system@workspace:.":
version: 0.0.0-use.local
resolution: "@pluralsh/design-system@workspace:."
dependencies:
"@babel/core": 7.20.2
"@babel/preset-env": 7.20.2
"@babel/preset-react": 7.18.6
"@emotion/react": 11.10.5
"@emotion/styled": 11.10.5
"@floating-ui/react-dom-interactions": 0.10.3
"@pluralsh/eslint-config-typescript": 2.4.2
"@react-aria/button": 3.6.2
"@react-aria/checkbox": 3.6.0
"@react-aria/combobox": 3.4.2
"@react-aria/focus": 3.9.0
"@react-aria/interactions": 3.12.0
"@react-aria/listbox": 3.7.0
"@react-aria/overlays": 3.11.0
"@react-aria/radio": 3.4.0
"@react-aria/select": 3.8.2
"@react-aria/tabs": 3.3.2
"@react-aria/utils": 3.14.0
"@react-aria/visually-hidden": 3.5.0
"@react-stately/collections": 3.4.4
"@react-stately/combobox": 3.2.2
"@react-stately/overlays": 3.4.2
"@react-stately/radio": 3.6.0
"@react-stately/tabs": 3.2.2
"@react-stately/toggle": 3.4.2
"@react-types/shared": 3.15.0
"@storybook/addon-actions": 6.5.13
"@storybook/addon-docs": 6.5.13
"@storybook/addon-essentials": 6.5.13
"@storybook/addon-interactions": 6.5.13
"@storybook/addon-links": 6.5.13
"@storybook/builder-webpack5": 6.5.13
"@storybook/manager-webpack5": 6.5.13
"@storybook/node-logger": 6.5.13
"@storybook/preset-create-react-app": 4.1.2
"@storybook/react": 6.5.13
"@storybook/testing-library": 0.0.13
"@tanstack/react-table": 8.5.27
"@types/chroma-js": 2.1.4
"@types/react-transition-group": 4.4.5
"@types/styled-components": 5.1.26
"@typescript-eslint/eslint-plugin": 5.43.0
"@typescript-eslint/parser": 5.43.0
babel-loader: 9.1.0
chroma-js: 2.4.2
classnames: 2.3.2
eslint: 8.27.0
eslint-plugin-storybook: 0.6.7
fuse.js: 6.6.2
grommet: 2.27.0
grommet-icons: 4.8.0
highlight.js: 11.6.0
honorable: 0.148.0
honorable-theme-default: 0.66.0
prop-types: 15.8.1
react: 18.2.0
react-animate-height: 3.0.5
react-dom: 18.2.0
react-markdown: 8.0.3
react-merge-refs: 2.0.1
react-router-dom: 6.4.3
react-scripts: 5.0.1
react-spring: 9.5.5
react-transition-group: 4.4.5
rehype-raw: 6.1.1
resize-observer-polyfill: 1.5.1
rimraf: 3.0.2
styled-components: 5.3.6
typescript: 4.8.4
peerDependencies:
"@emotion/react": ">=11.9.3"
"@emotion/styled": ">=11.9.3"
honorable: ">=0.128.0"
honorable-theme-default: ">=0.63.0"
react: ">=16.0.0"
react-dom: ">=16.0.0"
react-transition-group: ">=4.4.2"
styled-components: ">=5.3.5"
languageName: unknown
linkType: soft

"@pluralsh/eslint-config-pluralsh@npm:^1.3.1":
version: 1.3.2
resolution: "@pluralsh/eslint-config-pluralsh@npm:1.3.2"
Expand Down Expand Up @@ -17291,91 +17376,6 @@ __metadata:
languageName: node
linkType: hard

"pluralsh-design-system@workspace:.":
version: 0.0.0-use.local
resolution: "pluralsh-design-system@workspace:."
dependencies:
"@babel/core": 7.20.2
"@babel/preset-env": 7.20.2
"@babel/preset-react": 7.18.6
"@emotion/react": 11.10.5
"@emotion/styled": 11.10.5
"@floating-ui/react-dom-interactions": 0.10.3
"@pluralsh/eslint-config-typescript": 2.4.2
"@react-aria/button": 3.6.2
"@react-aria/checkbox": 3.6.0
"@react-aria/combobox": 3.4.2
"@react-aria/focus": 3.9.0
"@react-aria/interactions": 3.12.0
"@react-aria/listbox": 3.7.0
"@react-aria/overlays": 3.11.0
"@react-aria/radio": 3.4.0
"@react-aria/select": 3.8.2
"@react-aria/tabs": 3.3.2
"@react-aria/utils": 3.14.0
"@react-aria/visually-hidden": 3.5.0
"@react-stately/collections": 3.4.4
"@react-stately/combobox": 3.2.2
"@react-stately/overlays": 3.4.2
"@react-stately/radio": 3.6.0
"@react-stately/tabs": 3.2.2
"@react-stately/toggle": 3.4.2
"@react-types/shared": 3.15.0
"@storybook/addon-actions": 6.5.13
"@storybook/addon-docs": 6.5.13
"@storybook/addon-essentials": 6.5.13
"@storybook/addon-interactions": 6.5.13
"@storybook/addon-links": 6.5.13
"@storybook/builder-webpack5": 6.5.13
"@storybook/manager-webpack5": 6.5.13
"@storybook/node-logger": 6.5.13
"@storybook/preset-create-react-app": 4.1.2
"@storybook/react": 6.5.13
"@storybook/testing-library": 0.0.13
"@tanstack/react-table": 8.5.27
"@types/chroma-js": 2.1.4
"@types/react-transition-group": 4.4.5
"@types/styled-components": 5.1.26
"@typescript-eslint/eslint-plugin": 5.43.0
"@typescript-eslint/parser": 5.43.0
babel-loader: 9.1.0
chroma-js: 2.4.2
classnames: 2.3.2
eslint: 8.27.0
eslint-plugin-storybook: 0.6.7
fuse.js: 6.6.2
grommet: 2.27.0
grommet-icons: 4.8.0
highlight.js: 11.6.0
honorable: 0.148.0
honorable-theme-default: 0.66.0
prop-types: 15.8.1
react: 18.2.0
react-animate-height: 3.0.5
react-dom: 18.2.0
react-markdown: 8.0.3
react-merge-refs: 2.0.1
react-router-dom: 6.4.3
react-scripts: 5.0.1
react-spring: 9.5.5
react-transition-group: 4.4.5
rehype-raw: 6.1.1
resize-observer-polyfill: 1.5.1
rimraf: 3.0.2
styled-components: 5.3.6
typescript: 4.8.4
peerDependencies:
"@emotion/react": ">=11.9.3"
"@emotion/styled": ">=11.9.3"
honorable: ">=0.128.0"
honorable-theme-default: ">=0.63.0"
react: ">=16.0.0"
react-dom: ">=16.0.0"
react-transition-group: ">=4.4.2"
styled-components: ">=5.3.5"
languageName: unknown
linkType: soft

"pnp-webpack-plugin@npm:1.6.4":
version: 1.6.4
resolution: "pnp-webpack-plugin@npm:1.6.4"
Expand Down

0 comments on commit cdf25f2

Please sign in to comment.