Skip to content

Commit f694434

Browse files
committed
ci: Enable npm publish with semantic-release
1 parent f8b7f46 commit f694434

File tree

3 files changed

+1307
-31
lines changed

3 files changed

+1307
-31
lines changed

.github/workflows/publish.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,11 @@ jobs:
1818
node-version: 12
1919
- run: |
2020
yarn install
21-
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}"
2221
yarn test
23-
- run: npx semantic-release
22+
- name: Release
23+
run: |
24+
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}"
25+
npx semantic-release
2426
env:
2527
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
2628
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

package.json

Lines changed: 21 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,18 @@
88
"url": "git+https://github.com/davesnx/babel-plugin-transform-react-qa-classes.git"
99
},
1010
"author": "davesnx <dsnxmoreno@gmail.com>",
11+
"keywords": [
12+
"babel",
13+
"plugin",
14+
"react",
15+
"component",
16+
"qa-classes"
17+
],
1118
"main": "lib/index.js",
19+
"files": [
20+
"lib",
21+
"README.md"
22+
],
1223
"scripts": {
1324
"clean": "rm -rf lib",
1425
"build": "babel src -d lib",
@@ -20,6 +31,8 @@
2031
"travis-deploy-once": "travis-deploy-once"
2132
},
2233
"dependencies": {
34+
"@semantic-release/github": "^5.5.5",
35+
"@semantic-release/npm": "^5.3.4",
2336
"eslint-config-davesnx-rules": "^1.0.0",
2437
"lodash.camelcase": "^4.3.0",
2538
"lodash.isstring": "^4.0.1",
@@ -38,27 +51,24 @@
3851
"semantic-release": "^15.10.3",
3952
"travis-deploy-once": "^5.0.9"
4053
},
41-
"keywords": [
42-
"babel",
43-
"plugin",
44-
"react",
45-
"component",
46-
"qa-classes"
47-
],
4854
"babel": {
4955
"presets": [
5056
"es2015",
5157
"stage-0"
5258
]
5359
},
54-
"files": [
55-
"lib",
56-
"README.md"
57-
],
5860
"husky": {
5961
"hooks": {
6062
"pre-commit": "npm run lint",
6163
"pre-push": "npm run test"
6264
}
65+
},
66+
"release": {
67+
"plugins": [
68+
"@semantic-release/commit-analyzer",
69+
"@semantic-release/release-notes-generator",
70+
"@semantic-release/github",
71+
"@semantic-release/npm"
72+
]
6373
}
6474
}

0 commit comments

Comments
 (0)