Skip to content

Commit dba84a4

Browse files
committedDec 21, 2023
feat(semantic-release): add semantic release
1 parent 96ac03b commit dba84a4

7 files changed

+15485
-6851
lines changed
 

‎.commitlintrc.json

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"extends": ["@commitlint/config-conventional"]
3+
}

‎.cz.json

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"path": "./node_modules/cz-conventional-changelog"
3+
}

‎.github/workflows/workflow-deployments.yml

+11-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Publish docs and NPM package
1+
name: Documentation and NPM package
22

33
on:
44
workflow_call:
@@ -87,6 +87,10 @@ jobs:
8787
name: Build and deploy release on NPM.js
8888
if: ${{ (github.event_name != 'workflow_dispatch' || inputs.npm_deploy) && github.ref_name == 'master' }}
8989
runs-on: ubuntu-22.04
90+
permissions:
91+
contents: write
92+
issues: write
93+
pull-requests: write
9094
steps:
9195
- name: Checkout project
9296
uses: actions/checkout@v3
@@ -99,14 +103,18 @@ jobs:
99103
with:
100104
node-version: ${{ inputs.node_lts_current_version }}
101105
registry-url: "https://registry.npmjs.org"
106+
scope: '@kuzzleio'
102107

103108
- name: Install depedencies
104109
run: npm ci
105110

106111
- name: Build depedencies
107112
run: npm run build
108113

109-
- name: Publish package
110-
run: npm publish
114+
- name: Release
111115
env:
116+
GITHUB_TOKEN: ${{ secrets.SEMANTIC_RELEASE_GHP }}
112117
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
118+
SEMANTIC_RELEASE_NPM_PUBLISH: "true"
119+
SEMANTIC_RELEASE_SLACK_WEBHOOK: ${{ secrets.SEMANTIC_RELEASE_SLACK_WEBHOOK }}
120+
run: npx semantic-release

‎.github/workflows/workflow.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ on:
44
push:
55
branches:
66
- master
7+
- beta
78
- 2-dev
89
pull_request:
910

‎.releaserc.json

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"extends": ["semantic-release-config-kuzzle"],
3+
"branches": [
4+
"master",
5+
{ "name": "beta", "prerelease": true }
6+
]
7+
}

‎package-lock.json

+15,451-6,848
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎package.json

+9
Original file line numberDiff line numberDiff line change
@@ -79,14 +79,21 @@
7979
"url": "git://github.com/kuzzleio/kuzzle.git"
8080
},
8181
"devDependencies": {
82+
"@commitlint/cli": "^17.6.7",
83+
"@commitlint/config-conventional": "^17.6.7",
8284
"@jest/globals": "29.7.0",
85+
"@semantic-release/changelog": "^6.0.3",
86+
"@semantic-release/commit-analyzer": "^10.0.1",
87+
"@semantic-release/git": "^10.0.1",
88+
"@semantic-release/release-notes-generator": "^11.0.4",
8389
"@types/jest": "29.5.10",
8490
"@types/js-yaml": "4.0.9",
8591
"@types/lodash": "4.14.202",
8692
"async": "3.2.5",
8793
"chokidar": "3.5.3",
8894
"codecov": "3.8.3",
8995
"cucumber": "6.0.5",
96+
"cz-conventional-changelog": "^3.3.0",
9097
"ergol": "1.0.2",
9198
"eslint-plugin-kuzzle": "0.0.12",
9299
"jest": "29.7.0",
@@ -97,6 +104,8 @@
97104
"request": "2.88.2",
98105
"request-promise": "4.2.6",
99106
"rewire": "5.0.0",
107+
"semantic-release-config-kuzzle": "^1.0.0",
108+
"semantic-release-slack-bot": "^4.0.2",
100109
"should": "13.2.3",
101110
"should-sinon": "0.0.6",
102111
"sinon": "14.0.2",

0 commit comments

Comments
 (0)
Please sign in to comment.