Skip to content

Commit 2ec0541

Browse files
feat: setup semantic release
1 parent 1ed0b05 commit 2ec0541

4 files changed

Lines changed: 152 additions & 4 deletions

File tree

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: build
2+
3+
permissions:
4+
contents: write # to be able to publish a GitHub release
5+
issues: write # to be able to comment on released issues
6+
pull-requests: write # to be able to comment on released pull requests
7+
id-token: write # to enable use of OIDC for npm provenance
8+
9+
on:
10+
push:
11+
branches:
12+
- main
13+
- beta
14+
15+
jobs:
16+
run_build:
17+
# Running only on self hosted runner which has tag "build"
18+
runs-on: [self-hosted, build]
19+
20+
concurrency:
21+
group: ${{ github.workflow }}-${{ github.ref }}
22+
23+
permissions:
24+
contents: write
25+
actions: write
26+
issues: write
27+
pull-requests: write
28+
29+
environment: build
30+
31+
steps:
32+
- uses: actions/checkout@v4
33+
- name: Use Node.js
34+
uses: actions/setup-node@v4
35+
with:
36+
node-version-file: .nvmrc
37+
- id: install-dev
38+
name: Install npm development dependencies
39+
run: npm ci --no-audit --silent
40+
- id: build
41+
name: Build
42+
run: npm run build
43+
- id: install-prod
44+
name: Install npm production dependencies
45+
run: npm ci --no-audit --silent --production
46+
- id: semantic-release
47+
name: Run semantic release
48+
run: npm run semantic-release
49+
env:
50+
CI: true
51+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
52+
NPM_CONFIG_REGISTRY: ${{ env.NPM_CONFIG_REGISTRY }}

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ You can use this directly in the [GitHub Copilot](https://docs.github.com/en/cop
4141
You can use this directly in the [Claude Code](https://docs.anthropic.com/en/docs/claude-code/mcp), by running:
4242

4343
```bash
44-
claude mcp add airtable --env CLIENT_ID=YOUR_CLIENT_ID --env APP_ID=YOUR_APP_ID -- npx -y @chargetrip/mcp
44+
claude mcp add chargetrip --env CLIENT_ID=YOUR_CLIENT_ID --env APP_ID=YOUR_APP_ID -- npx -y @chargetrip/mcp
4545
```
4646

4747
### Other AI agents

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 97 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@chargetrip/mcp",
3-
"version": "0.1.0",
3+
"version": "0.0.1",
44
"description": "Chargetrip MCP server",
55
"main": "dist/index.js",
66
"types": "dist/index.d.ts",
@@ -21,6 +21,7 @@
2121
"test": "node --expose-gc ./node_modules/.bin/jest -c ./jest.config.js --forceExit --maxWorkers=50% --unhandled-rejections=none",
2222
"test:e2e": "node --unhandled-rejections=none --expose-gc ./node_modules/.bin/jest -c ./jest.e2e.config.js --forceExit --runInBand",
2323
"type-check": "tsc --noEmit",
24+
"semantic-release": "semantic-release",
2425
"prepare": "husky",
2526
"prettier": "prettier -w ./src/**/*.ts",
2627
"commitlint": "commitlint --edit"
@@ -29,6 +30,8 @@
2930
"chargetrip",
3031
"mcp"
3132
],
33+
"repository": "https://github.com/chargetrip/mcp",
34+
"bugs": "https://github.com/chargetrip/mcp/issues",
3235
"author": "Chargetrip Developer Team <dev@chargetrip.com>",
3336
"homepage": "https://chargetrip.com/",
3437
"license": "MIT",
@@ -79,5 +82,98 @@
7982
"webpack": "^5.101.1",
8083
"webpack-cli": "^6.0.1",
8184
"webpack-node-externals": "^3.0.0"
85+
},
86+
"publishConfig": {
87+
"access": "public"
88+
},
89+
"release": {
90+
"branches": [
91+
{
92+
"name": "beta",
93+
"prerelease": true
94+
},
95+
{
96+
"name": "main",
97+
"prerelease": false
98+
}
99+
],
100+
"tagFormat": "${version}",
101+
"plugins": [
102+
[
103+
"@semantic-release/commit-analyzer",
104+
{
105+
"preset": "angular",
106+
"releaseRules": [
107+
{
108+
"type": "*",
109+
"scope": "*",
110+
"release": false
111+
},
112+
{
113+
"breaking": true,
114+
"release": "major"
115+
},
116+
{
117+
"type": "docs",
118+
"scope": "*",
119+
"release": false
120+
},
121+
{
122+
"type": "feat",
123+
"scope": "*",
124+
"release": "minor"
125+
},
126+
{
127+
"type": "fix",
128+
"scope": "*",
129+
"release": "patch"
130+
},
131+
{
132+
"type": "perf",
133+
"scope": "*",
134+
"release": "patch"
135+
},
136+
{
137+
"type": "refactor",
138+
"scope": "*",
139+
"release": false
140+
}
141+
],
142+
"parserOpts": {
143+
"noteKeywords": [
144+
"BREAKING CHANGE",
145+
"BREAKING CHANGES"
146+
]
147+
}
148+
}
149+
],
150+
"@semantic-release/release-notes-generator",
151+
[
152+
"@semantic-release/changelog",
153+
{
154+
"changelogFile": "CHANGELOG.md"
155+
}
156+
],
157+
[
158+
"@semantic-release/git",
159+
{
160+
"assets": [
161+
"CHANGELOG.md",
162+
"package.json",
163+
"package-lock.json"
164+
],
165+
"message": "chore: release version ${nextRelease.version}"
166+
}
167+
],
168+
"@semantic-release/github",
169+
"@semantic-release/npm",
170+
[
171+
"semantic-release-slack-bot",
172+
{
173+
"notifyOnSuccess": true,
174+
"notifyOnFail": true
175+
}
176+
]
177+
]
82178
}
83179
}

0 commit comments

Comments
 (0)