Skip to content

Commit 7b15d7e

Browse files
committed
build command, semantic release
1 parent 6a401cb commit 7b15d7e

File tree

5 files changed

+66
-5
lines changed

5 files changed

+66
-5
lines changed

.github/workflows/release.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Release npm package
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
7+
jobs:
8+
release:
9+
name: Release
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@main
13+
- uses: actions/setup-node@v1
14+
with:
15+
node-version: "12.x"
16+
- run: npm install
17+
- run: npm run generate
18+
- run: npm run test
19+
- run: npx semantic-release
20+
env:
21+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
22+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
File renamed without changes.

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,5 @@ svg
1010
tests
1111

1212

13-
yarn.lock
13+
yarn.lock
14+
package-lock.json

README.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,31 @@
11
# eos-icons-react
22
[![Open Source Love svg2](https://badges.frapsoft.com/os/v2/open-source.svg?v=103)](https://github.com/ellerbrock/open-source-badges/)
33

4+
## Development of EOS icons React
5+
- Cloning the repo:
6+
```
7+
git clone https://github.com/EOS-uiux-Solutions/eos-icons-react
8+
```
9+
10+
- run for installing all the required dependencies.
11+
```
12+
npm install
13+
```
14+
15+
### Package build command
16+
- run for producing the final build files.
17+
```
18+
npm run generate
19+
```
20+
21+
### Testing
22+
Follow the above steps before running the test command. The test sequence requires the presence of the final build files in order to test them.
23+
24+
- run to start the testing of the final build files using Jest.
25+
```
26+
npm run test
27+
```
28+
429
# Learn more about the EOS Design System
530

631
- [EOS Design System](https://www.eosdesignsystem.com/)

package.json

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
"name": "eos-icons-react",
33
"version": "1.0.0",
44
"description": "Eos-Icons React npm package",
5-
"main": "index.js",
5+
"main": "./lib/index.js",
6+
"module": "./es/index.js",
67
"scripts": {
78
"fetch": "gulp --require ts-node/register/transpile-only",
89
"script:filled": "TS_NODE_PROJECT=scripts/tsconfig.json node -r ts-node/register scripts/index.ts --target=filled",
@@ -13,8 +14,7 @@
1314
"build:lib": "tsc --project tsconfig.build.json --module commonjs --outDir lib",
1415
"build": "npm run build:es && npm run build:lib",
1516
"generate": "npm run fetch && npm run icon && npm run build",
16-
"test": "jest --env=jsdom",
17-
"test:update": "jest -u"
17+
"test": "jest --env=jsdom"
1818
},
1919
"repository": {
2020
"type": "git",
@@ -29,6 +29,8 @@
2929
"devDependencies": {
3030
"@babel/preset-env": "^7.14.7",
3131
"@babel/preset-react": "^7.14.5",
32+
"@semantic-release/git": "^9.0.0",
33+
"@semantic-release/github": "^7.2.3",
3234
"@testing-library/jest-dom": "^5.14.1",
3335
"@testing-library/react": "^12.0.0",
3436
"@types/gulp": "^4.0.8",
@@ -50,11 +52,22 @@
5052
"react": "^17.0.2",
5153
"react-dom": "^17.0.2",
5254
"react-test-renderer": "^17.0.2",
55+
"semantic-release": "^17.4.4",
5356
"ts-jest": "^27.0.3",
5457
"ts-node": "^10.0.0",
5558
"typescript": "^4.3.2"
5659
},
5760
"peerDependencies": {
5861
"react": "^17.0.2"
59-
}
62+
},
63+
"release": {
64+
"branches": [
65+
"main"
66+
]
67+
},
68+
"files": [
69+
"src",
70+
"es",
71+
"lib"
72+
]
6073
}

0 commit comments

Comments
 (0)