Skip to content

Commit c2c1613

Browse files
authored
Release config (#342)
* make package publicly available, improve configuration * restore github publish * change version to minor, remove private field * remove redundant eslint config
1 parent ad3d4c4 commit c2c1613

File tree

3 files changed

+54
-52
lines changed

3 files changed

+54
-52
lines changed

.github/workflows/ release.yaml

+6-7
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Node.js Package
1+
name: Publish to NPM
22
on:
33
release:
44
types: [created]
@@ -10,13 +10,12 @@ jobs:
1010
- uses: actions/setup-node@v2
1111
with:
1212
node-version: "14"
13-
- run: npm install --global npm
14-
- run: echo "registry=https://registry.npmjs.org/" > .npmrc
13+
registry-url: "https://registry.npmjs.org"
1514
- run: echo "@nordcloud:registry=https://npm.pkg.github.com/" >> .npmrc
1615
- run: echo "//npm.pkg.github.com/:_authToken=${NODE_AUTH_TOKEN}" >> .npmrc
16+
- run: npm install --global npm
17+
- run: npm ci
18+
- run: npm run check:types
19+
- run: npm publish --access public --ignore-scripts
1720
env:
1821
NODE_AUTH_TOKEN: ${{ secrets.NPM_KEY }}
19-
- run: npm install
20-
- run: npm run check-types
21-
- run: cat .npmrc
22-
- run: npm publish

.npmrc

-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
1-
registry=https://registry.npmjs.org/
2-
@nordcloud:registry=https://npm.pkg.github.com/
31
engine-strict=true

package.json

+48-43
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,56 @@
11
{
22
"name": "@nordcloud/gnui",
3-
"version": "1.8.1",
3+
"description": "Nordcloud Design System - a collection of reusable React components used in Nordcloud's SaaS products",
4+
"version": "1.9.0",
45
"license": "MIT",
56
"main": "dist/index.js",
67
"types": "dist/index.d.ts",
7-
"repository": "git://github.com/nordcloud/gnui.git",
8+
"repository": {
9+
"type": "git",
10+
"url": "git+https://github.com/nordcloud/GNUI.git"
11+
},
12+
"author": "Nordcloud Engineering",
13+
"bugs": {
14+
"url": "https://github.com/nordcloud/GNUI"
15+
},
16+
"scripts": {
17+
"start": "react-scripts start",
18+
"build": "react-scripts build",
19+
"test": "react-scripts test",
20+
"eject": "react-scripts eject",
21+
"storybook": "start-storybook -p 9009 -s public",
22+
"build-storybook": "build-storybook -s public",
23+
"format": "prettier --ignore-path .gitignore --write \"**/*.+(js|json|ts|tsx)\"",
24+
"check:types": "tsc",
25+
"lint": "eslint --ignore-path .gitignore --ext .ts,.tsx ."
26+
},
27+
"engines": {
28+
"node": ">=14.15.5",
29+
"npm": ">=7.0.0"
30+
},
31+
"browserslist": {
32+
"production": [
33+
">0.2%",
34+
"not dead",
35+
"not op_mini all"
36+
],
37+
"development": [
38+
"last 1 chrome version",
39+
"last 1 firefox version",
40+
"last 1 safari version"
41+
]
42+
},
43+
"husky": {
44+
"hooks": {
45+
"pre-commit": "lint-staged && npm run check:types"
46+
}
47+
},
48+
"lint-staged": {
49+
"*.{ts,tsx}": [
50+
"prettier --write",
51+
"eslint --fix"
52+
]
53+
},
854
"dependencies": {
955
"@babel/core": "^7.9.6",
1056
"@babel/preset-env": "^7.9.6",
@@ -49,47 +95,6 @@
4995
"title": "^3.4.1",
5096
"typescript": "^3.9.7"
5197
},
52-
"scripts": {
53-
"start": "react-scripts start",
54-
"build": "react-scripts build",
55-
"test": "react-scripts test",
56-
"eject": "react-scripts eject",
57-
"storybook": "start-storybook -p 9009 -s public",
58-
"build-storybook": "build-storybook -s public",
59-
"format": "prettier --ignore-path .gitignore --write \"**/*.+(js|json|ts|tsx)\"",
60-
"check-types": "tsc",
61-
"lint": "eslint --ignore-path .gitignore --ext .ts,.tsx ."
62-
},
63-
"engines": {
64-
"node": ">=14.15.5",
65-
"npm": ">=7.0.0"
66-
},
67-
"eslintConfig": {
68-
"extends": "react-app"
69-
},
70-
"browserslist": {
71-
"production": [
72-
">0.2%",
73-
"not dead",
74-
"not op_mini all"
75-
],
76-
"development": [
77-
"last 1 chrome version",
78-
"last 1 firefox version",
79-
"last 1 safari version"
80-
]
81-
},
82-
"husky": {
83-
"hooks": {
84-
"pre-commit": "lint-staged && npm run check-types"
85-
}
86-
},
87-
"lint-staged": {
88-
"*.{ts,tsx}": [
89-
"prettier --write",
90-
"eslint --fix"
91-
]
92-
},
9398
"devDependencies": {
9499
"@storybook/addon-actions": "^6.0.5",
95100
"@storybook/addon-docs": "^6.0.5",

0 commit comments

Comments
 (0)